This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Static and Dynamic linking.


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]