title: How to correctly handle dependencies of static libraries?
body: <p>I have a project LibA, which is a static library and uses a third party library Lib3. Project LibA builds and executes just fine.</p>
  
  <p>I have another project Exe, which is an executable and uses  LibA. This compiles, but the linker doesn't find the functions from Lib3, which are used in LibA only. </p>
  
  <p>Things I have tried: </p>
  
  <ul>
  <li>adding the location of Lib3 to the Libary Directories paths in project Exe (the same way as Lib3 is referenced in LibA)</li>
  <li>adding the location of Lib3 to the Additional Library Directories of the linker</li>
  <li>copying the Lib3 *.lib files to the output folder of project LibA (which thus contains the LibA *.lib file)</li>
  </ul>
  
  <p>No matter what I try I still get <code>LNK2019: Unresolved external symbol</code>. Only if I in LibA remove the code that actually calls into Lib3 I'm able to compile and link project Exe properly.</p>
  
  <p>How to correctly handle dependencies of static libraries?</p>
  
  <p>Edit: Some code to clarify:</p>
  
  <p>LibA contains LibA.h and LibA.cpp:</p>
  
  <p>LibA.h:</p>
  
  <pre><code>class LibA {
      void doSomething();
  }
  </code></pre>
  
  <p>LibA.cpp:</p>
  
  <pre><code>#include "LibA.h"
  #include "Lib3.h"
  
  void LibA::doSomething() {
      //call stuff in Lib3.h
  }
  </code></pre>
  
  <p>Exe.cpp:</p>
  
  <pre><code>#include "LibA.h"
  
  int _tmain(int argc, _TCHAR* argv[])
  {
     LibA a = new LibA();
     a.doSomething();
  }
  </code></pre>