C++ / Documentation search
Find the error. Find the next step.
Search by diagnostic code, copied message, or symptom. Filter by content and project system.
47 results
Browse documentation →Use vcpkg libraries in Visual Studio
Add C++ libraries to a Visual Studio project with vcpkg in manifest mode, choose the right triplet, and fix the errors it causes.
C1083: cannot open include file
Fix C1083 cannot open include file in Visual Studio: include directories, configurations, quotes, and missing SDKs.
LNK1104: cannot open file
Fix LNK1104 cannot open file in Visual Studio: missing library paths, libraries not built yet, and output files locked by a running program.
LNK1112: module machine type conflicts with target machine type
Fix LNK1112 module machine type x64 conflicts with x86: libraries and object files built for another platform.
LNK1181: cannot open input file
Fix LNK1181 cannot open input file: a library name or folder that does not exist, or a library not built yet.
LNK2001: unresolved external symbol
What LNK2001 unresolved external symbol means, how it differs from LNK2019, and how to fix static members, virtual functions, and globals.
LNK2019: unresolved external symbol
What LNK2019 unresolved external symbol means in Visual Studio, its common causes, and how to fix each of them.
LNK2038: mismatch detected
Fix LNK2038 mismatch detected for RuntimeLibrary or _ITERATOR_DEBUG_LEVEL: make every project and library use the same runtime.
LNK4098: defaultlib conflicts with use of other libs
Fix LNK4098 defaultlib MSVCRT conflicts with use of other libs: link every library with the same C runtime.
MSVC binary compatibility and its restrictions
Microsoft's compatibility rules for the linker, Redistributable, and objects built with /GL or /LTCG.
C1083: A dependency or an SDK is not installed.
For Windows or standard headers, install the Windows SDK or the C++ workload in the Visual Studio Installer; for a library, restore it, for example with vcpkg.
C1083: It is set for another configuration or platform.
Settings made for Debug or Win32 only do not apply to Release or x64: select All Configurations and All Platforms when you add the directory.
C1083: Its folder is not an include directory.
Add it to C/C++ > General > Additional Include Directories , relative to the project with $(ProjectDir) or $(SolutionDir) rather than as an absolute path.
C1083: Quotes and angle brackets search differently.
#include "file.h" looks first next to the including file; <file.h> only in the include directories.
C1083: The path in the directive is wrong.
Check the folder names in #include "lib/file.h" against the directory you added.
LNK1104: The file is the program itself, and it is still running.
When the message names your .exe or .dll , close the running program or stop debugging; an antivirus scanning the file can also lock it briefly.
LNK1104: The file name contains the wrong configuration or platform.
Check macros such as $(Configuration) and $(Platform) in the dependency name and in the library directories.
LNK1104: The library folder is not in the search path.
Add it to Linker > General > Additional Library Directories for the configuration and platform you build. Paths set only for Debug or only for Win32 are a common trap.
LNK1104: The library is built by another project that has not been built yet.
Add a project reference, or a build dependency in Project Dependencies , so that the library is built first.
LNK1112: A library was built for the other platform.
Link the x64 build of the library in x64 configurations and the x86 one in Win32, with platform-specific paths in Linker > General > Additional Library Directories , such as lib\$(PlatformTarget) .