g++ refuses linking on HPUX with HP ld (32bit)
John David Anglin
dave@hiauly1.hia.nrc.ca
Wed Apr 7 03:52:00 GMT 2004
> $ g++ -fPIC -shared -fno-gnu-linker -o libtrbg.sl trbg.o
> /usr/ccs/bin/ld: Unrecognized argument: +init
Suggest that you apply the latest HP linker patch. +init is definitely
a supported linker option under HP-UX 11. As well as +init/+fini,
there are other reasons to update your linker. This is documented
in the installation notes for HP-UX 11.
You can't turn off +init/+fini except by hacking the pa backend.
If you do, constructors/destructors won't work. If you go back
to the old technique used with HP-UX 10, you will find that constructors
and destructors for dynamically loaded libraries don't run.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
More information about the Gcc-help
mailing list