Return-Path: Delivered-To: apmail-xerces-c-users-archive@www.apache.org Received: (qmail 78479 invoked from network); 4 Jan 2011 18:04:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Jan 2011 18:04:15 -0000 Received: (qmail 58132 invoked by uid 500); 4 Jan 2011 18:04:15 -0000 Delivered-To: apmail-xerces-c-users-archive@xerces.apache.org Received: (qmail 58080 invoked by uid 500); 4 Jan 2011 18:04:15 -0000 Mailing-List: contact c-users-help@xerces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: c-users@xerces.apache.org Delivered-To: mailing list c-users@xerces.apache.org Received: (qmail 58072 invoked by uid 99); 4 Jan 2011 18:04:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 18:04:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.15.83.3] (HELO MX1.integrity-apps.com) (208.15.83.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jan 2011 18:04:05 +0000 Received: from MX1.integrity-apps.com (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 043EFC3331_D236101B for ; Tue, 4 Jan 2011 18:03:45 +0000 (GMT) Received: from exchange.integrity-apps.com (208-15-83-4.integrity-apps.com [208.15.83.4]) by MX1.integrity-apps.com (Sophos Email Appliance) with ESMTP id A499DC05F1_D236100F for ; Tue, 4 Jan 2011 18:03:44 +0000 (GMT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01CBAC39.BA2F540A" Subject: RE: Creating a shared library that uses xerces Date: Tue, 4 Jan 2011 13:02:53 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Creating a shared library that uses xerces Thread-Index: AcusOQX/YN5ZZNTLSve/dx7wLNIeHAAAJWxE References: <4D235FB1.6010304@gmail.com> From: "Cole, Derek" To: X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CBAC39.BA2F540A Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am going to do that eventually, but I couldnt actually install the = libraries on this system yet -----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 =20 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=20 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 > ------_=_NextPart_001_01CBAC39.BA2F540A--