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]

Re: g++301 on sol8: how to link to some static and some dynamic links


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


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