title: Reuse C++ Header files
body: <p>I have a Visual C++ solution with 2 projects <strong>AlgorithmA</strong> &amp; <strong>AlgorithmB</strong> and both share a common header file <strong>RunAlgo.h</strong> with the class declaration. Each project in the solution has its own unique implementation for the header file.</p>
  
  <p>I am trying to compile a DLL out of the common header file <strong>RunAlgo.h</strong> and add reference to this DLL in the projects <strong>AlgorithmA</strong> &amp; <strong>AlgorithmB</strong>. I have then included separate <strong>RunAlgo.cpp</strong> definition file in both my projects. The problem is that I am getting linker errors while compiling the new DLL project which has only the header file.</p>
  
  <p>So, the question is</p>
  
  <ol>
  <li>Can a header file with only class declaration be compiled into a DLL (<strong><em>Similar to class library containing an Interface in C#</em></strong>)? </li>
  <li>For the above scenario, is there a better approach to reuse the common Header file among projects?</li>
  <li>Should the above method work (re-check my code?)</li>
  </ol>