Static and Dynamic linking.

Gigi Sullivan sullivan@sikurezza.org
Tue Oct 31 13:36:00 GMT 2000


Aiee :)

   Hello!

   AFAIK when compiling a simple program, gcc will try to compile
   and link the program using shared libraries (if any).

   What about if I'd like that, say, foo.c will be linked with
   just libbar.a (static library) and not with libbar.so (ok, soname
   and realname are right)?

   I could use the -static gcc flag, but this will cause gcc to link
   all the libraries the the program needs *statically* (while I'd like
   to have *only* libbar to be linked statically - the other libraries
   should remain `shared' ones).

   Any ideas? May I have to play with the linker too?

bye bye

                        -- gg sullivan

-- 
Lorenzo Cavallaro	`Gigi Sullivan' <sullivan@sikurezza.org>

LibRNet Project Home Page: http://www.sikurezza.org/sullivan
LibRNet Mailing List: librnet-subscribe@egroups.com

Until I loved, life had no beauty;
I did not know I lived until I had loved. (Theodor Korner)


More information about the Gcc-help mailing list