This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
building shared libs with g++ 2.95.2 on HP-UX 11
- To: gcc bug reports <gcc-bugs at gcc dot gnu dot org>
- Subject: building shared libs with g++ 2.95.2 on HP-UX 11
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Sat, 09 Sep 2000 17:38:57 -0600
- Organization: Rogue Wave Software, Inc.
Hi,
I'm wondering if anyone knows how to prevent the linker errors (shown
below) I'm getting when building shared libs on HP-UX 11 (I know it's
not a supported platform).
Compiling and linking in the same step seems to work but I'd prefer not
to have to do that.
Thanks in advance
Martin
$ echo "void foo () { }" > t.cpp ; gcc -c -fPIC t.cpp && gcc t.o -shared
-o libt.sl
/usr/bin/ld: DP relative code in file /var/tmp/ccyhoDuR.o - shared
library must be position
independent. Use +z or +Z to recompile.
collect2: ld returned 1 exit status