title: How to solve error LNK2019: unresolved external symbol error in Visual Studio 2012 with C++?
body: <p>I have a visual c++ console project named "C_test".</p>
  
  <p>Another project is called "dll_project" which is dll project.</p>
  
  <p>in "C_test" project, I have set the location of additional include directory for "dll_project".</p>
  
  <p>I have these simple codes.</p>
  
  <p>in "C_test" project's main.cpp.</p>
  
  <pre><code>#include "SampleClass.h"
  
  int main()
  {
      SampleClass *_parser    = new SampleClass();
  
      return 0;
  }
  </code></pre>
  
  <p>And in "dll_project" SampleClass.h and SampleClass.cpp.</p>
  
  <p>SampleClass.h</p>
  
  <pre><code>#pragma once
  class SampleClass
  {
  public:
      SampleClass(void);
      ~SampleClass(void);
  };
  </code></pre>
  
  <p>SampleClass.cpp</p>
  
  <pre><code>#include "SampleClass.h"
  
  
  SampleClass::SampleClass(void)
  {
  }
  
  
  SampleClass::~SampleClass(void)
  {
  }
  </code></pre>
  
  <p>When I try to debug or build, I get this error.</p>
  
  <p>error LNK2019: unresolved external symbol "public: __thiscall SampleClass::SampleClass(void)" (??0SampleClass@@QAE@XZ) referenced in function _main C:\C_test\main.obj  C_test</p>
  
  <p>What have I done wrong?</p>