C++ / Visual Studio reference
MSVC build errors,
explained.
Compiler, linker, and MSBuild diagnostics explained with focused examples of the problem and its correction.
Linker errors and warnings
LNK2019
unresolved external symbol
LNK2001
unresolved external symbol
LNK1104
cannot open file
LNK2038
mismatch detected
LNK2005
symbol already defined
LNK1120
unresolved externals
LNK1168
cannot open file for writing
LNK1112
module machine type conflicts with target machine type
LNK1181
cannot open input file
LNK4098
defaultlib conflicts with use of other libs
LNK2026
module unsafe for SAFESEH image
Compiler errors and warnings
C2065
undeclared identifier
C1083
cannot open include file
C4996
function may be unsafe or deprecated
C2039
is not a member of
C2440
cannot convert
C2664
cannot convert argument
C4430
missing type specifier
C2011
type redefinition
C1010
unexpected end of file while looking for precompiled header
C2280
attempting to reference a deleted function
C2143
syntax error: missing ';' before
C2061
syntax error: identifier
C2027
use of undefined type
C3861
identifier not found
C2512
no appropriate default constructor available
C2259
cannot instantiate abstract class
C2084
function already has a body
C1004
unexpected end-of-file found
C2001
newline in constant
C4244
conversion, possible loss of data
C4267
conversion from 'size_t', possible loss of data
MSBuild errors
MSB8020
build tools cannot be found
MSB8036
Windows SDK version not found
MSB3073
command exited with code
MSB6006
exited with code
Using CppPilot in Visual Studio
CppPilot connects your own Codex or Claude account to Visual Studio. If you have neither, CppPilot Cloud provides AI access for build fixes, reviews, crash analysis, and project checks. AI chat requires your own Codex or Claude account.