cpp-build
Fix C++ build errors, CMake issues, and linker problems incrementally. Invokes the cpp-build-resolver agent for minimal, surgical fixes.
- Kind
- Prompt
- Works with
- Claude Code, Codex
- Languages
- C / C++
- Source
- affaan-m/ECC @ d3b8a3e90890
- Path
- commands/cpp-build.md
- License
- MIT
- Jobs
- Debugging
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# C++ Build and Fix This command invokes the **cpp-build-resolver** agent to incrementally fix C++ build errors with minimal changes. ## What This Command Does 1. **Run Diagnostics**: Execute `cmake --build`, `clang-tidy`, `cppcheck` 2. **Parse Errors**: Group by file and sort by severity 3. **Fix Incrementally**: One error at a time 4. **Verify Each Fix**: Re-run build after each change 5. **Report Summary**: Show what was fixed and what remains ## When to Use Use `/cpp-build` when: - `cmake --build build` fails with errors - Linker errors (undefined references, multiple definitions) - Template instantiation failures - Include/dependency issues - After pulling changes that break the build ## Diagnostic Commands Run ```bash # CMake configure cmake -B build -S . # Build cmake --build build 2>&1 | head -100 # Static analysis (if available) clang-tidy src/*.cpp -- -std=c++17 cppcheck --enable=all src/ ``` ## Example Session ```text User: /cpp-build Agent: # C++ Build Resolution ## Initial Diagnostics ```bash $ cmake --build build src/service/user.cpp:25:15: error: use of undeclared identifier 'UserRepository' …