title: Linker Error with abstract class when including inherited class in another project
body: <p>If I have an abstract class </p>
  
  <p>like this:</p>
  
  <pre><code>#pragma once
  #include &lt;string&gt;
  
  class BaseObject
  {
  public:
      virtual std::string to_string() = 0;
  };
  </code></pre>
  
  <p>and some class extends this class.</p>
  
  <pre><code>#pragma once
  #include "baseobject.h"
  
  class Point : BaseObject
  {
  public:
      Point() {}
      ~Point() {}
      Point(float _x, float _y) : x(_x), y(_y) {}
  
      std::string to_string();
  
      float x, y;
  };
  </code></pre>
  
  <p>Within the same project I can have the function implementation of <code>to_string</code> in the cpp file of the derived class but when I want to use this class in another project in the same solution I get a linker error </p>
  
  <p><code>error LNK2001: unresolved external symbol "public: virtual class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; __cdecl Point::to_string(void)" (?to_string@Point@@UEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
  1&gt;path\to\CircleHT_Test.exe : fatal error LNK1120: 1 unresolved externals</code> </p>
  
  <p>once I move the implementation to the header file it's all good. Why is this? Should I always implement pure virtual functions in the header of a derived class?</p>