This is the mail archive of the gcc-bugs@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]

building shared libs with g++ 2.95.2 on HP-UX 11


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

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