[LCP]statically linking argtable and other libraries

Christopher Baus christopher at baus.net
Thu Jul 8 14:55:02 UTC 2004


Howdy,

Maybe I just don't understanding gcc linker, but I am a bit confused about
static vs dynamic linking of libraries.  When I build argtable
(http://argtable.sourceforge.net/) it produces a .a and a .so file.  If I
delete the .so the linker statically links argtable when using the
-largtable2 switch.  If I leave the .so's the linker dynamically links
argtable.  How can I leave the .so and force the linker to link
statically?  I am using the -static switch, but that doesn't seem to do
the trick.

TIA.

-- 
Christopher Baus
http://www.baus.net/
Tahoe, Wine, and Linux.





More information about the linuxCprogramming mailing list