This is the mail archive of the
mailing list for the GCC project.
Static and Dynamic linking.
- To: gcc-help at gcc dot gnu dot org
- Subject: Static and Dynamic linking.
- From: Gigi Sullivan <sullivan at sikurezza dot org>
- Date: Tue, 31 Oct 2000 22:35:54 +0100
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?
-- gg sullivan
Lorenzo Cavallaro `Gigi Sullivan' <email@example.com>
LibRNet Project Home Page: http://www.sikurezza.org/sullivan
LibRNet Mailing List: firstname.lastname@example.org
Until I loved, life had no beauty;
I did not know I lived until I had loved. (Theodor Korner)