title: Protobuffers in c++ and error LNK2019: unresolved external symbol
body: <p>I am new to c++ and visual studio 2012 so probably the problem is between the screen and the chair. I performed the following steps;</p>
  
  <ol>
  <li>I made a simple proto file with the option optimize_for = LITE_RUNTIME</li>
  <li>Create the matching h and c files with protoc</li>
  <li>Compiled the library libprotobuf-lite.lib</li>
  <li>Created a new console Visual Studio 2012 project.</li>
  <li>Copied the libprotobuf-lite.lib where my single source file is.</li>
  <li>Created a new folder named protobuffers</li>
  <li>Copied the c, h and the google directory from the protobuffers src directory to the protobuffers folder</li>
  <li>Added the protobuffers folder as an Additional Include Directory</li>
  <li>Added the library file to the linker through Additional Dependencies</li>
  <li><p>Compiled the following source file;</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "protobuffers\genome.pb.h"
  
  int main()
  {
     genomeMessage::Genome genome;
     return 0;
  }
  </code></pre></li>
  <li><p>Stuck... I get the following error;</p>
  
  <pre><code>1&gt;Source.obj : error LNK2019: unresolved external symbol "public: __cdecl genomeMessage::Genome::Genome(void)" (??0Genome@genomeMessage@@QEAA@XZ) referenced in function main
  1&gt;Source.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl genomeMessage::Genome::~Genome(void)" (??1Genome@genomeMessage@@UEAA@XZ) referenced in function main
  1&gt;C:\Projects\testproto\x64\Debug\testproto.exe : fatal error LNK1120: 2 unresolved externals
  </code></pre></li>
  </ol>
  
  <p>So I know it is not a missing lib file because if I move the lib file the linker complains that it can't find it. The problem is that I have no clue how to fix this ... anyone?</p>