VisualStudio:Warning
lastmod 2019-05-21created 2015-04-046 edits
Describes warnings that appear in Visual Studio and how to fix them.
Fixing PDB-related LNK4099, LNK4204 link warnings
It means vc90.pdb is missing, or vc90.pdb exists but has no debug information in it. In this case, three Protocol Buffers projects generated vc90.pdb in the same place, so the file was overwritten. So it falls under the case where the file exists but has no debug information. As with Google's C++ test framework, you can cleanly fix it by changing the settings to add the project name again to the intermidiate directory (default: debug, release).
C2894
This error happened when you include your header file
just include #include "cs.h" outside extern c and you are good to go.
LNK2019
- unresolved external symbol 'symbol' referenced in function 'function'
- The linker could not find a definition for the external symbol "symbol" used in function "function". There are many issues that can cause this error.
- The spelling of the symbol declaration does not match the spelling of the symbol definition.
- A function is used, but the type or number of its parameters does not match the function definition.
- A function or variable is declared but not defined.
- The calling convention differs between the function declaration and the function definition.
- A symbol is defined in a C file but declared without using extern "C" in a C++ file.
- A symbol is defined as static and then later referenced outside the file.
- A static member of a class is not defined.
- A build dependency is defined only as a project dependency in the solution.
- A console application is built using settings for a Windows application.
- Different compiler options for function inlining are used in different source files.
- An automatic variable is used outside its scope.
- An intrinsic is called, or argument types are passed to an intrinsic that is not supported on the target architecture.
- Code that uses native wchar_t is mixed with code that does not.
LNK2038
Mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease'
- The runtime libraries of the libraries you use must match.
- The relevant flags are
/MT,/MD.
LNK2038
_DEBUG may be set in Release mode. Check related macros such as NDEBUG.
LNK4217
- locally defined symbol 'symbol' imported in function 'function'
- The symbol is defined locally, but
__declspec(dllimport)was specified for it. Remove the__declspecqualifier to resolve this warning.
R6034
This error occurs when an error related to a Runtime library, such as a DLL, occurs. You need to resolve the dependencies with a utility such as depends or modify the Manifest.
Not found ssize_t
Incremental Link Table (ILT)
The following warning may occur during the link stage.
Delete that file and rebuild.
See also
References
-
Visual_studio-LNK4099_LNK4204_warning.zip ↩