I actually didnt write this originally, so I am not sure what the purpose is. I just took that out and it cleared up that problem.
Thanks for the good eye -----Original Message----- From: Alain Leblanc [mailto:[email protected]] Sent: Tue 1/4/2011 12:51 PM To: [email protected] Subject: Re: Creating a shared library that uses xerces Why do you add both libxerces-c.a and libxerces-c-3.1.so? Not sure what you're trying to do, but you probably don't need the .a file. a 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 >
