This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: statically link some libraries and dynamically link others?
- From: "John Love-Jensen" <eljay at adobe dot com>
- To: "Frank Geck" <fgeck at att dot net>, "GNU GCC help list" <gcc-help at gcc dot gnu dot org>
- Date: Tue, 15 Jan 2002 12:40:47 -0600
- Subject: Re: statically link some libraries and dynamically link others?
- References: <3C447221.22DA0AFC@att.net>
Hi Frank,
>Is it possible to statically link some libraries and dynamically link
others?
Yes.
I do it like this, e.g.:
g++ -o foo \
foo.cpp bar.cpp quux.cpp \
-Wl,-Bstatic -lstdc++ -lgcc \
-Wl,-Bdynamic -lsocket -lc -lm
Sincerely,
--Eljay