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

    LNK2038: Projects use different runtime libraries.

    Set the same C/C++ > Code Generation > Runtime Library in every project of the program: /MD everywhere, or /MT everywhere, with /MDd or /MTd in Debug.

  2. Examples and diagramsMSBuild + CMake

    LNK4098: /NODEFAULTLIB hides the conflict.

    Ignoring the default library silences the warning without making the runtimes compatible: use it only for a library you know is not needed.

  3. Examples and diagramsMSBuild + CMake

    LNK4098: A Release library is linked in Debug.

    Link the Debug build of the library in the Debug configuration.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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 .

  9. Examples and diagramsMSBuild

    MSB8036: The project needs that exact SDK.

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

  10. Examples and diagramsMSBuild

    Upgrade an old C++ project to a newer Visual Studio: Fix the stricter compiler

    Newer compilers follow the standard more closely, and new projects turn conformance mode ( /permissive- ) on. Expect errors on code that older versions accepted: string literals assigned to char* ( C2440 ); missing typename before dependent…

  11. Examples and diagramsMSBuild

    Upgrade an old C++ project to a newer Visual Studio: Retarget the toolset and the SDK

    Right-click the solution and choose Retarget solution , or set General > Platform Toolset (v143 for Visual Studio 2022) and General > Windows SDK Version ( 10.0 (latest installed version) ) in every project and configuration. A toolset or…