title: Unresolved external symbol (LNK2019)
body: <p>I have the following files:<br>
  interface.h  </p>
  
  <pre><code>class Interface
  {
    ...
  };
  
  Interface* CreateInterface();
  </code></pre>
  
  <p>impl.h</p>
  
  <pre><code>#include "interface.h"
  
  class Impl: public Interface
  {
    ...
  };
  </code></pre>
  
  <p>impl.cpp</p>
  
  <pre><code>#include "impl.h"
  
  SomeInterface* CreateInterface()
  {
    return new Impl;
  }
  ...
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>#include "Interface.h"
  int main()
  {
    CreateInterface();
  }
  </code></pre>
  
  <p>Originally my project looked liked <a href="https://stackoverflow.com/q/2481138/279982">this</a>. But for testing purposes all files are in the same project now.<br>
  When compiling I get LNK2019 error saying CreateInterface is unresolved. I'm using VS 2008 I have no idea what's wrong.</p>