Static linking to libgcc_s and libstdc++

bjorn rohde jensen bjensen@fastmail.fm
Sun Aug 4 22:41:00 GMT 2002


Hi John,

 In the past i have passed link options through gcc/g++
to the platform linker to do this sort of thing by means
of -Wl,option1,option2.... The idea is to switch to static
linking before the -l option for the lib, you want to link
to statically, and back to shared linking after it.
 Depending on what combination of shared/static libs you
want to use, you might need to tell gcc not to implicitly
link with its libs with the -nostdlib and do that manually.

Yours sincerely,

Bjorn



More information about the Gcc-help mailing list