| View previous topic :: View next topic |
| Author |
error LNK2001 |
Cuchulainn

Joined: 18 Dec 2006 Posts: 461 Location: Amsterdam, the Netherlands
|
Posted: Sun Feb 14, 2010 10:29 pm Post subject: |
|
|
with templates you must include the .cpp file or as you say put in .hpp
Please see chapter 2 of my 2006 C++ book. |
|
| Back to top |
|
 |
Learner
Joined: 27 Oct 2009 Posts: 1
|
Posted: Wed Jan 06, 2010 6:57 pm Post subject: error LNK2001 |
|
|
So I am frustrated with this error.
---------------------------
Linking...
Main.obj : error LNK2001: unresolved external symbol "public: double __thiscall Vec<double>::operator[](int)" (??A?$Vec@N@@QAENH@Z)
Main.obj : error LNK2001: unresolved external symbol "public: __thiscall Vec<double>::Vec<double>(int,double *)" (??0?$Vec@N@@QAE@HPAN@Z)
Debug/Brand New.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
-------------------------
Yes I have checked that the proper header files are referenced in appropriate files but to no avail. The code works fine if entire code is in a single file.
Thanks for your time guys. |
|
| Back to top |
|
 |
|