C ++ unresolved external

Does anyone know what that means?

1> Generating Code... 1>BlankWindowDXbaseImpl.obj : error LNK2019: unresolved external symbol "public: __thiscall DXBase::DXBase(void)" ( ??0DXBase@ @ QAE@XZ ) referenced in function "public: __thiscall BlankWindowDXBaseImpl::BlankWindowDXBaseImpl(void)" ( ??0BlankWindowDXBaseImpl@ @ QAE@XZ ) 1>BlankWindowDXbaseImpl.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall DXBase::~DXBase(void)" ( ??1DXBase@ @ UAE@XZ ) referenced in function "public: virtual __thiscall BlankWindowDXBaseImpl::~BlankWindowDXBaseImpl(void)" ( ??1BlankWindowDXBaseImpl@ @ UAE@XZ ) 1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall DXBase::shutdown(void)" ( ?shutdown@DXBase @@QAEXXZ) referenced in function _wWinMain@16 1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall DXBase::initalize(struct HINSTANCE__ *,struct HWND__ *)" ( ?initalize@DXBase @@ QAE_NPAUHINSTANCE__@ @ PAUHWND__@ @@Z) referenced in function _wWinMain@16 1>C:\backup\development\directXworkspace\BlankWindow\Debug\BlankWindow.exe : fatal error LNK1120: 4 unresolved externals 
+6
source share
6 answers

This means that you have unresolved external characters.

What are the characters? Symbols can be any of a variable, class, member function, or function.

Why are they not resolved? Some of your code (or the libraries that you use) rely on these characters, and they were not found because you are not linking the correct library or implementing it.

+13
source

Yes, this means that your program calls functions that are declared but have no body.

Do you expect these features to be part of your code or provided by some library?

+4
source

This means that you have a problem with the linker. (Linker cannot find a library with these characters). You need to include the desired library in your library path.

+1
source

You may not be contacting the appropriate library.

But you should give more details. It looks like you are asking a question in a quiz contest.

0
source

I had the same problem and if you add a comment #pragma (lib, "d3d9.lib") This will include the library files needed to compile your code. It is just confused which lib file to capture either 64 or 32 bits. Hope this helps.

0
source

I am sharing a problem that was just discovered that was difficult to detect: if you a.lib into two a.lib ( a.lib and b.lib ) located in different lib paths ( /PathToA/ and /PathToB/ ), the problem is unresolved external Problems can arise if there is an old version of, say, b.lib in the path /PathToA/ .

In this case, you may incorrectly reference an unwanted library. Thus, as a solution to this particular multi-link problem, make sure you do not have multiple versions of the library in your library paths.

0
source

All Articles