c++ - error LNK2001: unresolved external symbol despite inclusion of header file -


i have problem can't seem resolve. have file jobdispatcher.cpp includes file #include "calculatenormalsjob.h" containing declaration of class same name.

class calculatenormalsjob : public job {  public:     calculatenormalsjob(some params); ... }; 

the file calculatenormalsjob.cpp contains following definition

calculatenormalsjob::calculatenormalsjob(some params)     : job(params) { } 

both calculatenormalsjob.h , calculatenormalsjob.cpp in same project , folder jobdispatcher.cpp creates job object as

add(new calculatenormalsjob(some params)); 

during linking, receive following error

error   9   error lnk2001: unresolved external symbol "public: __thiscall calculatenormalsjob::calculatenormalsjob(class resourcemap *,class jobscheduler *,class job *,int)" (??0calculatenormalsjob@@qae@pavresourcemap@@pavjobscheduler@@pavjob@@h@z)    c:\fredrik\vs12\proflexa\scanner\jobdispatcherjob.obj 

i clueless have forgotten. i'm using visual studio 2012 under win7 , included v110 compiler.

any appreciated!

edit:

for reason seems calculatenormalsjob.cpp not compiled. have no clue why. included in project , visual studio's intellisense has knowledge of class , it's functions.

edit 2:

calculatenormalsjob.h calculatenormalsjob(resourcemap *state, jobscheduler *scheduler,  job* listener, int scannumber);   calculatenormalsjob.cpp calculatenormalsjob::calculatenormalsjob(resourcemap *state, jobscheduler *scheduler, job* listener, int scannumber)     : job(state, scheduler, listener), scannumber(scannumber) { }   call: add(new calculatenormalsjob(state,scheduler,this,scannbr)); 

i checked properties of file calculatenormalsjob.cpp (right click->properties) , turned out created header file , later renamed .cpp, it's "item type" setting set header file. when changed setting c/c++ compiler compiled should , linker find external symbol.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -