record-manager-blank/SETUP.md
trevon 1a650d4aaa
Some checks failed
grade / grade (push) Failing after 5s
push (blank)
2026-08-26 01:12:22 +00:00

41 lines
1.6 KiB
Markdown

# Setup — CS 2060 toolchain
Everything required is **free**. Full detail (macOS/Replit paths, debugging
setup, help sources): the course [`setup.md`](../setup.md).
## 1. Editor + toolchain (the fast path)
| Platform | What to install |
| :--- | :--- |
| Windows | **VS Code + WSL2** (the compiler lives in Linux): `wsl --install -d Ubuntu`, then in VS Code add the **Remote - WSL** extension and open this repo in WSL |
| macOS | **VS Code** + `xcode-select --install` (gives `clang` + `make`) |
| Linux | VS Code (or any editor) |
**Windows: use WSL2, not Visual Studio/MSVC** — the autograder is Linux + GCC +
`make` + Valgrind, and milestone 5 requires Valgrind (Linux-only).
## 2. Compiler & tools (Linux / WSL2 / Codespaces)
```bash
sudo apt update && sudo apt install -y build-essential gcc clang make gdb valgrind git
```
## 3. Debugging in VS Code (gdb)
1. Install the **C/C++ extension** (`ms-vscode.cpptools`).
2. Open this folder (in WSL on Windows).
3. Add `.vscode/tasks.json` (build: `make`) and `.vscode/launch.json` (gdb,
`program: ${workspaceFolder}/build/recman`, `preLaunchTask: make`) — the
course repo ships copies.
4. **F5** → build + debug. No VS Code? Terminal: `gdb ./build/recman`, then
`break record_new`, `run`, `print r->name`, `backtrace`.
## 4. Verify before you start
```bash
gcc --version && make --version && gdb --version && valgrind --version && git --version
make && make test # the starter must build and pass
```
If anything fails, fix the environment in week 1 — that's what office hours are
for (CYBR A120-L).