error LNK2019: unresolved external symbol - unseen instance of the issue
<p>Im having a error LNK2019: unresolved external symbol problem.</p>

<p>I have 2 files and im moving them to a shared location so 2 different projects can use class.
There are other classes in there like this.</p>

<p>The problem is that when i call the class from the main of one of the projects im getting</p>

<pre><code>error LNK2019: unresolved external symbol "public: __thiscall CProcessCommandLine::~CProcessCommandLine(void)" (??1CProcessCommandLine@@QAE@XZ) referenced in function _main
error LNK2019: unresolved external symbol "public: bool __thiscall CProcessCommandLine::Wait(void)const " (?Wait@CProcessCommandLine@@QBE_NXZ) referenced in function _main
error LNK2019: unresolved external symbol "public: class std::vector&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt;,class std::allocator&lt;class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; &gt; &gt; const &amp; __thiscall CProcessCommandLine::getTargetNamesVect(void)" (?getTargetNamesVect@CProcessCommandLine@@QAEABV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@XZ) referenced in function _main
error LNK2019: unresolved external symbol "public: __thiscall CProcessCommandLine::CProcessCommandLine(void)" (??0CProcessCommandLine@@QAE@XZ) referenced in function _main
</code></pre>

<p>When i open the header file and right click on one of the functions and go to go to definition it doesnt go to the definition in the .cpp. When i right click on a function in the .cpp and say go to definition it says "The symbol  is not defined". </p>

<p>Anyone know why this might be happening? Both the .h and .cpp are in the same location and that location is in the Additional Include Directories of the project</p>

<p>EDIT:</p>

<p>The following code exists in other files in this folder:</p>

<pre><code>#ifdef PROJ1
#include "class1.h"
#elif PROJ2
#include "class2.h"
#endif
</code></pre>

<p>Ive never seen these things before. They are used in the code but only to include a correct header depending on which project it is used in. The above is in the .cpp of other classes in this folder. So i put it in here. But in other classes the project it doesnt belong to is greyed out. When i put it into the .h it greys out the correct header. But for some reason this .cpp isnt being recognized as part of the project. </p>
