Skip to content
Search

VisualStudio:Warning

lastmod 2019-05-21created 2015-04-046 edits

Describes warnings that appear in Visual Studio and how to fix them.

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).

Output Directory : $(ConfigurationName)
Intermediate Directory : $(OutDir)\$(ProjectName)  

C2894

error C2894: templates cannot be declared to have 'C' linkage

This error happened when you include your header file

extern "C" {
    #include "Header.h"
}

just include #include "cs.h" outside extern c and you are good to go.

#include "Header.h"
extern "C" {
    //code
}

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

error LNK2038: '_ITERATOR_DEBUG_LEVEL'에 대해 불일치가 검색되었습니다.
'0' 값이 '2'(C.obj에 위치) 값과 일치하지 않습니다.

_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 __declspec qualifier to resolve this warning.

R6034

An application has made an attempt to load the C runtime library incorrectly.
...

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

#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif

The following warning may occur during the link stage.

LINK : warning LNK4076: '.\Debug/프로젝트이름.ilk' 증분 상태 파일이 잘못되었습니다. 비증분 링크합니다.

Delete that file and rebuild.

See also

References


  1. Visual_studio-LNK4099_LNK4204_warning.zip ↩

author Zer0 sitemap