Datasim Financial Forums Forum Index


 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
error LNK2001

 
Post new topic   Reply to topic    Datasim Financial Forums Forum Index -> C++ Student Questions and Answers
View previous topic :: View next topic  
Author error LNK2001
Cuchulainn



Joined: 18 Dec 2006
Posts: 461
Location: Amsterdam, the Netherlands

PostPosted: Sun Feb 14, 2010 10:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Learner



Joined: 27 Oct 2009
Posts: 1

PostPosted: Wed Jan 06, 2010 6:57 pm    Post subject: error LNK2001 Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Datasim Financial Forums Forum Index -> C++ Student Questions and Answers All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group