Note that there are some explanatory texts on larger screens.

plurals
  1. POerror LNK2001: unresolved external symbol despite inclusion of header file
    primarykey
    data
    text
    <p>I have a problem I can't seem to resolve. I have a file JobDispatcher.cpp which includes a file <code>#include "CalculateNormalsJob.h"</code> containing the declaration of a class with the same name.</p> <pre><code>class CalculateNormalsJob : public Job { public: CalculateNormalsJob(some params); ... }; </code></pre> <p>The file CalculateNormalsJob.cpp contains the following definition</p> <pre><code>CalculateNormalsJob::CalculateNormalsJob(some params) : Job(params) { } </code></pre> <p>Both CalculateNormalsJob.h and CalculateNormalsJob.cpp are in the same project and folder as JobDispatcher.cpp which creates a Job object as</p> <pre><code>add(new CalculateNormalsJob(some params)); </code></pre> <p>During linking, I receive the following error</p> <pre><code>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 </code></pre> <p>I am clueless as to what I have forgotten. I'm using Visual studio 2012 under Win7 and the included v110 compiler.</p> <p>Any help appreciated!</p> <p>EDIT:</p> <p>For some reason it seems like <code>CalculateNormalsJob.cpp</code> is not compiled. I have however no clue as to why. It is included in the project and Visual studio's IntelliSense has knowledge of the class and it's functions. </p> <p>EDIT 2:</p> <pre><code>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)); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload