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]

Help!! Can you please tell me how to build a shared library...


Hi,

I've been trying to build a shared library using gcc on an hpux 10.20
system.
I have however been unsuccessfull. can you please shed some lights, I'm
totally lost as to what I should do.  Thanks a million.

This is the error that I get when trying to build a dynamic library. The
library that I'm trying to build is called libjcif.so. 

This is the error  (I did the 2 lines of asterisks (****) down below to
quote the error message)

****************************************************************************
***************************************
/usr/ccs/bin/ld: DP relative code in file
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/libstdc++.a(cstrmain.o) -
shared library must be position independent.  Use +z or +Z to recompile.
****************************************************************************
***************************************
The above error message is coming from the following command that I'm
executing from a makefile,
Building libjcif.so
/usr/local/bin/gcc -shared -o ../build/hpux-hppa/debug/lib/libjcif.so
hpux-hppa/debug/jCifAccess.o hpux-hppa/debug/jCifAgent.o
hpux-hppa/debug/jCifConnection.o hpux-hppa/debug/jCifDomain.o
hpux-hppa/debug/jCifJob.o hpux-hppa/debug/jCifKeyRing.o
hpux-hppa/debug/jCifLicense.o hpux-hppa/debug/jCifMessage.o
hpux-hppa/debug/jCifModule.o hpux-hppa/debug/jCifPolicy.o
hpux-hppa/debug/jCifPolicyRunReport.o hpux-hppa/debug/jCifStatus.o
hpux-hppa/debug/jCifSticky.o hpux-hppa/debug/jCifSumfinal.o
hpux-hppa/debug/jCifSuppress.o hpux-hppa/debug/jCifTemplateLayout.o
hpux-hppa/debug/jCifTemplateSubType.o  -L../build/hpux-hppa/debug/lib -lesmc
-lcsp -ldbq -lesmu -lesm -lesmc -lcsp -ldbq -lesmu -lesm -lV3
/usr/lib/libdld.sl -lstdc++
/usr/ccs/bin/ld: DP relative code in file
/opt/gcc/lib/gcc-lib/hppa1.1-hp-hpux10.20/2.95.2/libstdc++.a(cstrmain.o) -
shared library must be position independent.  Use +z or +Z to recompile.
collect2: ld returned 1 exit status
make: *** [../build/hpux-hppa/debug/lib/libjcif.so] Error 1


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