xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cole, Derek" <dc...@integrity-apps.com>
Subject RE: Creating a shared library that uses xerces
Date Tue, 04 Jan 2011 18:02:53 GMT

I am going to do that eventually, but I couldnt actually install the libraries on this system

-----Original Message-----
From: Alain Leblanc [mailto:aalebl@gmail.com]
Sent: Tue 1/4/2011 12:58 PM
To: c-users@xerces.apache.org
Subject: Re: Creating a shared library that uses xerces
Also, you should not be specifying the libraries by name. Something like 
the following should work better, but then it depends on what you're 
really trying to do. May need some reordering.

g++ -O3 -Wall -shared -L../../lib -L../../lib/Linux -L/usr/lib64/ -fopenmp -fPIC -o libviewerNativeDLL.so
 ViewerNative.o  -lIDT -lxerces-c-3.1 -lcurl -lidn -ldl -lssl -lfftw3f  -lpthread

On 1/4/11 12:46 PM, Cole, Derek wrote:
> Hello all - first post here!
> I am trying to create a shared library using xerces, and I am running into some problems.
> I am using the following line to build my shared lib:
> g++ -O3 -Wall -fopenmp -fPIC -shared -o libviewerNativeDLL.so  ViewerNative.o -L/usr/lib64/
../../lib/IDT.a ../../lib/Linux/libxerces-c.a ../../lib/Linux/libxerces-c-3.1.so -lcurl -lidn
-ldl -lssl ../../lib/Linux/libfftw3f.a  -lpthread
> and I am getting the following return message:
> /usr/bin/ld: ../../lib/Linux/libxerces-c.a(PlatformUtils.o): relocation R_X86_64_32 against
`.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
> ../../lib/Linux/libxerces-c.a: could not read symbols: Bad value
> Do I really have to rebuild xerces and edit the makefile to include the fPIC flag, or
am I doing something else wrong?
> Thanks
> Derek

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message