public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* statically link some libraries and dynamically link others?
@ 2002-01-15 10:20 Frank Geck
  2002-01-15 10:50 ` John Love-Jensen
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Geck @ 2002-01-15 10:20 UTC (permalink / raw)
  To: GNU GCC help list

Is it possible to statically link some libraries and dynamically link
others?  If so how?

Thanks,

Frank

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: statically link some libraries and dynamically link others?
  2002-01-15 10:20 statically link some libraries and dynamically link others? Frank Geck
@ 2002-01-15 10:50 ` John Love-Jensen
  0 siblings, 0 replies; 2+ messages in thread
From: John Love-Jensen @ 2002-01-15 10:50 UTC (permalink / raw)
  To: Frank Geck, GNU GCC help list

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-15 18:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-15 10:20 statically link some libraries and dynamically link others? Frank Geck
2002-01-15 10:50 ` John Love-Jensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).