title: Compiling PIC object with static library
body: <p>I am generating a shared library on linux and I am using this xml parser "mini xml" to parse some xml config files for my library. The thing I want is not to have any dependency on this xml parser so I want to use the static libmxml.a library provided by the vendor instead of using libmxml.so which is also there along with libmxml.so such that my shared library does not depend on libmxml when deployed. I have tried following but it doesnt work.</p>
  
  <blockquote>
    <p>gcc -fPIC -o myobject.o -static -lmxml -c myobject.c</p>
  </blockquote>
  
  <p>but it gives warning </p>
  
  <blockquote>
    <p>Linker input unused because linking not done</p>
  </blockquote>
  
  <p>What am i missing? Any help would be appreciated.</p>