title: how can i force gcc to link a static library?
body: <p>I write a static library: libA.a. I have another application called B.o. B.o doesn't used any functions in libA.a. I want to combine libA.o into B.o, then I could call some stuff in libA.a by other methods, when B.o is running.</p>
  
  <p>I write makefile like this: <code>gcc B.c -o B.o -lA -u symbol_A</code>. Here -u is from GCC manual:</p>
  
  <p><a href="http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html" rel="nofollow">http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html</a></p>
  
  <p>It suggests use -u to force linking unused library, and symbol_A is some symbol in libA.a</p>
  
  <p>But it doesn't work. After linking, I can not find any LibA.a's stuff in B.o.</p>
  
  <p>May anyone give me some hint?</p>
  
  <p>p.s I am using GCC 3.4.4, eclipse+CDT under windows, and B.o will be deployed under linux. </p>