This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Static and Dynamic Linking with GCC
- To: gcc at gcc dot gnu dot org
- Subject: Static and Dynamic Linking with GCC
- From: Dan Mergens <dan at photon dot com>
- Date: Fri, 20 Jul 2001 14:27:08 -0700
- Organization: Photon Research Associates
Is it possible to link with both static and dynamic libraries on a gcc
compile line? The -static option prevents dynamic linking, and in
version 3 you can choose the link mode for libgcc. However, I want to
know if I can specify the libraries to be link statically or
dynamically. For example, in IRIX you can do the following:
CC a.o -B static -lfoo -Bdynamic -lbar
which will link which libfoo.a, libbar.so, and the standard .so's
What is the equivalent gcc command line? (I'm beginning to think it
doesn't exist).
Thanks!
Dan Mergens