title: Mixing static libraries and shared libraries
body: <p>I have a project where I have one static library <code>libhelper.a</code> and another with my actual shared object library, <code>libtestlib.so</code>. My goal is to link <code>libhelper.a</code> into <code>libtestlib.so</code>. Is that possible on Linux/BSD?  When I tried and created a test program I got the following errors:</p>
  
  <blockquote>
    <p>./prog1:/usr/local/lib/libtestlib.so.1.0: undefined symbol ''</p>
  </blockquote>
  
  <p>My guess is that this is occurring because libhelper.a was not compiled with <code>-fPIC</code> while <code>libtestlib.so</code> was. What is the proper way to build programs that use shared libraries that also have dependancies on static libraries?</p>
  
  <p>Thanks!</p>