How to force static linking of some libs when using -shared?
Hello,
I'm building a .so file for a package, which uses a library I would like
to link statically in the .so file. I currently use something like
cc -shared *.o /usr/lib/libsomelib.a -o name.so
Is there a shorter way? If I use -static -lsomelib it does not work...
On the other hand, when I build without needing to statically link, I do
cc -shared *.o -lsomelib -o name.so
I think the -lsomelib is not useful since there's no link phase. Can I
remove it?
Yves.
--
Yves Arrouye Email: Yves.Arrouye@marin.fdn.fr
7, avenue Leon Bollee Web: http://www.fdn.fr/~yarrouye/
75013 Paris Work: +33 45 95 64 59
France Home: +33 53 61 09 55
Reply to: