This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++301 on sol8: how to link to some static and some dynamic links
- To: Bruno dot Voigt at ic3s dot de
- Subject: Re: g++301 on sol8: how to link to some static and some dynamic links
- From: Phil Edwards <pedwards at disaster dot jaj dot com>
- Date: Tue, 30 Oct 2001 10:58:58 -0500
- Cc: gcc at gcc dot gnu dot org
- References: <OF34AC0F82.90C3C4A4-ONC1256AF5.003C550D@ic3s.de>
On Tue, Oct 30, 2001 at 12:02:06PM +0100, Bruno.Voigt@ic3s.de wrote:
> What must I do to link statically to all the standard g++ libs
> and link dynamically to the oracle libs?
Nearly all linkers have a switch meaning "start using static libs" and
another for "start using shared libs". You use the -Wl hook to pass the
correct linker options to whichever linker you're using (Sun's ld or GNU's
ld, for example).
e.g., g++ *.o -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic -loracle
or something like that; I don't recall offhand. The man page for ld(1)
has more.
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams