This is the mail archive of the gcc@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 with GCC


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


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