title: C++ DLL: Inheritance and usage of a class defined in a static library
body: <p>I'm trying to build a DLL, which implements a class that inherent from a class inside a precompiled static library.</p>
  
  <p>The both projects have a shared header file where the first class is declared (<em>GroovyClass.h</em>):</p>
  
  <pre class="lang-c prettyprint-override"><code>class GroovyClass
  {
  public:
      GroovyClass();
      virtual ~GroovyClass();
  }
  </code></pre>
  
  <p>In the static lib this class is defined and implemented (<em>GroovyClass.cpp</em>) and compiled (let's call the result <em>GroovyClass.lib</em>).</p>
  
  <p>In the shared library/DLL this class is then inherited like this:</p>
  
  <pre class="lang-c prettyprint-override"><code>#include "GroovyClass.h"
  
  class MassiveFail : GroovyClass
  {
  public:
      MassiveFail();
      virtual ~MassiveFail();
  }
  </code></pre>
  
  <p>This compiles, but at the linking stage I get errors regarding <strong>unresolved symbols</strong> for the GroovyClass constructor and destructor. I link with <em>GroovyClass.lib</em> as usual, so I don't understand why it can't find the symbols.</p>
  
  <p>Do I need to declare GroovyClass in some special way before being able to use/inherit it in my DLL project?</p>