Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error LNK2001: unresolved external symbol

Status
Not open for further replies.

vanleurth

Programmer
Sep 1, 2001
156
US
Sorry to bother everybody;

But after three days straight serching the net I gave up.
I'm declaring a class that can handle two dimesional arrays created dynamically. Well, everything looks good but whenever it comes to compilation and linking I get the following message.

error LNK2001: unresolved external symbol &quot;public: __thiscall CDyn2D<double>::CDyn2D<double>(int,int)&quot; (??0?$CDyn2D@N@@QAE@HH@Z)
Debug/OpenGL.exe : fatal error LNK1120: 1 unresolved externals

Wondering what am I missing since the header files are included and everything. Problably it has to be with the template definicion.

Thank you in advance and good coding,

Vanleurth
 
I'm not sure if this is going to solve your problem...

Something I like to do when I used templates is to include the .cpp at the end of the .h

sounds kind of strange... but that was something that was done some years ago(this way... you'd only have to compile your file containing the main)... be sure to place your definition code between

#ifndef TEMPLATE.cpp
#define TEMPLATE.cpp

...

#endif

good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top