C++ / Documentation search
Find the error. Find the next step.
Search by diagnostic code, copied message, or symptom. Filter by content and project system.
31 results
Browse documentation →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.
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.
LNK4098: A Release library is linked in Debug.
Link the Debug build of the library in the Debug configuration.
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.
MSB8020: A build server lacks the toolset.
Install the same Build Tools components on the server, or pass /p:PlatformToolset=v143 to MSBuild.
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.
MSB8020: The project must keep its toolset.
Install it from the Visual Studio Installer: Individual components , MSVC build tools of that version.
MSB8036: The project names an old SDK.
Set General > Windows SDK Version to 10.0 (latest installed version) , or choose Retarget solution .
MSB8036: The project needs that exact SDK.
Install it from the Visual Studio Installer, under Individual components .
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…
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…