Fix common MSVC build errors
What the most frequent Visual Studio C++ compiler, linker, and MSBuild errors mean, why they happen, and how to fix each cause.
Linker errors
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
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
MSBuild errors
Let the AI fix it in Visual Studio
CppPilot is a free extension that explains and fixes MSVC build errors with Codex, Claude, or CppPilot Cloud.