CppPilot

C++ / Documentation search

Find the error. Find the next step.

Search by diagnostic code, copied message, or symptom. Filter by content and project system.

  1. Examples and diagramsMSBuild + CMake

    LNK4098: A library uses another runtime library.

    Build all projects and libraries with the same C/C++ > Code Generation > Runtime Library : /MD with /MDd in Debug, or /MT with /MTd . Use the library build that matches.

  2. Examples and diagramsMSBuild

    MSB3073: A copy tool uses nonzero codes for non-failure outcomes.

    robocopy uses codes below 8 for non-failure outcomes. Normalize those to zero while preserving codes of 8 or higher. xcopy uses different codes: 1 means no files were found to copy, and 4 is an initialization error. See Microsoft's robocopy…

  3. Examples and diagramsMSBuild

    MSB3073: A path contains spaces.

    Quote every path in the command: copy "$(ProjectDir)config.json" "$(OutDir)" .

  4. Examples and diagramsMSBuild

    MSB3073: The command or program is not found (code 9009).

    Use the full path of the program, or a macro such as $(SolutionDir) ; the event runs in the project folder, not in the solution folder.

  5. Examples and diagramsMSBuild

    MSB3073: The destination file is locked.

    The program or another process still holds it: close it and build again.

  6. Examples and diagramsMSBuild

    MSB6006: A custom build step failed.

    For cmd.exe , the same causes as MSB3073 apply: quote the paths and check the tool it runs.

  7. Examples and diagramsMSBuild

    MSB6006: An antivirus blocks the tool.

    Check the security product's detection log. If trusted build tools were blocked, restore or repair them after reviewing the detection, and use a narrowly scoped exception only when appropriate.

  8. Examples and diagramsMSBuild

    MSB6006: The compiler ran out of memory.

    Errors such as C1060 or C1076 before MSB6006 mean memory pressure, often with parallel builds and large templates: lower Maximum concurrent C++ compilations or the /MP count, or use the 64-bit toolset.

  9. Examples and diagramsMSBuild

    MSB6006: The real error is printed earlier.

    Open View > Output , show the Build output, and look for the first error above MSB6006. Set Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity to Detailed to see more.

  10. Examples and diagramsMSBuild

    MSB8020: A build server lacks the toolset.

    Install the same Build Tools components on the server, or pass /p:PlatformToolset=v143 to MSBuild.

  11. Examples and diagramsMSBuild

    MSB8020: The project comes from an older Visual Studio.

    Right-click the solution and choose Retarget solution , or set General > Platform Toolset to the installed toolset, such as v143.

  12. Examples and diagramsMSBuild

    MSB8020: The project must keep its toolset.

    Install it from the Visual Studio Installer: Individual components , MSVC build tools of that version.

  13. Examples and diagramsMSBuild

    MSB8036: The project names an old SDK.

    Set General > Windows SDK Version to 10.0 (latest installed version) , or choose Retarget solution .

  14. Examples and diagramsMSBuild

    MSB8036: The project needs that exact SDK.

    Install it from the Visual Studio Installer, under Individual components .

  15. Examples and diagramsMSBuild

    Precompiled headers in Visual Studio: Set it up

    Create pch.h with the stable headers the project uses most, for example <windows.h> , <string> , <vector> , and third-party libraries. Create pch.cpp that contains only #include "pch.h" . In the project properties, for all configurations,…

  16. Examples and diagramsMSBuild

    Precompiled headers in Visual Studio: What to put in it

    Headers that are large, included by many files, and rarely changed: system headers, the standard library, and external libraries. Keep your own headers out of it, or only the most stable ones: each change to a header in pch.h recompiles…