tmighty
tmighty

Reputation: 11409

C++ VS2010 Unresolved symbol

I really hate this problem that the compiler tells me

"err LNK2019: Reference to unresolved external symbol".

Unlike other compiler errors, I can not jump to this problem by double-clicking it.

It always takes me a tremendous amount of time to figure out what I did wrong.

For example, from the error message

Error   9   error LNK2019: Reference to unresolved symbol ""public: class std::vector<unsigned char,class std::allocator<unsigned char> > & __thiscall clsJoinBigUnsignedCharMap::Content(void)" (?Content@clsJoinBigUnsignedCharMap@@QAEAAV?$vector@EV?$allocator@E@std@@@std@@XZ)" in Funktion ""private: void __thiscall CCompiler::pSerializeJoinBigUnsignedCharMap(class clsJoinBigUnsignedCharMap &,struct _iobuf *)" (?pSerializeJoinBigUnsignedCharMap@CCompiler@@AAEXAAVclsJoinBigUnsignedCharMap@@PAU_iobuf@@@Z)".    m:\compiler.obj voice

I can not see at all where I should look for the error.

Am I missing something here? I don't see where the error is located, and the fact that I can not jump to the problem by double-clicking it indicates to me that VS2010 does not know either.

Thank you for the help.

Upvotes: 1

Views: 82

Answers (2)

Stephane Rolland
Stephane Rolland

Reputation: 39926

If you read the message it says:

in Funktion ""private: void __thiscall CCompiler::pSerializeJoinBigUnsignedCharMap(class clsJoinBigUnsignedCharMap &,struct _iobuf *)"

so in the function CCompiler::pSerializeJoinBigUnsignedCharMap, there is a unreferenced symbol

clsJoinBigUnsignedCharMap::Content(void)

the linker cannot link with clsJoinBigUnsignedCharMap::Content, it has no compiled code for it.

Upvotes: 3

Reed Copsey
Reed Copsey

Reputation: 564771

Your CCompiler::pSerializeJoinBigUnsignedCharMap (from compiler.obj) is using a method (clsJoinBigUnsignedCharMap::Content()) that's defined in a header, but not implemented within any of the linked source files.

Upvotes: 4

Related Questions