C++/LNK2001 - unresolved external symbol
I am working in XP, Visual C++ v6 doing maintenance on existing games. I am new to C++ language and to game programming. I have a linking error and would appreciate some expert help.
Animate.obj : error LNK2001: unresolved external symbol "public: __thiscall XCFramePlay::XCFramePlay(class CDC &,int,int)" (??0XCFramePlay@@QAE@AAVCDC@@HH@Z)
Thank you and any help would be appreciated.
Tom Hicks , Thank you for your question.
This is an error caused by a program reference that was not satisfied by any object file in the list of files being linked.
For example, suppose I write the code
There will be no compilation error, because the syntax is correct. The resulting object file will call a function 'ABC' which it expects to find in another compilation unit or in a library.
But if this is the only code, the linker will report that 'ABC' is unresolved. The program cannot run because the actual definition of 'ABC' cannot be found.
The linker adds "decoration" to the names it looks up. The decoration represents the data type of the name. The linker does this because it is very simple and does not "understand" what a datatype is.
In your case, a constructor for the class XCFramePlay is missing from your project file list and/or library list. You can look up 'XCFramePlay' in Microsoft's MSDN Library at http://search.microsoft.com/us/dev/default.asp
. If you don't find it, that probably means that your code is using a custom library that is missing.