expat shared library

James Thompson jamest at math.ksu.edu
Thu Jul 15 06:16:39 BST 1999


I'd check the archives but I can't until I get a message on the list with
the instructions on the bottom.  Kind of a catch 22 :-)

Trying to build a shared library out of expat so I can add it my my own
shared lib

Modified Makefile

  CC=libtool gcc

  modified the OBJS to reference .lo in place of .o

  added

libexpat.la: $(OBJS)
        libtool gcc -g -O -o libexpat.la $(OBS) -rpath /usr/local/lib -lm

did a 
make 
make libexpat.la

next (as root)
          libtool install -c libexpat.la /usr/local/lib/liblibexpat.la  
          libtool --finish /usr/local/lib
          cp xmlparse/xmlparse.h /usr/local/include/
          cp xmlparse/xmlparse.h /usr/local/include/
	  /sbin/ldconfig 

Then I added -lexpat to my Makefile.am on my program

doing a make / make check results in

[jamest at calvin obelisk]$ make check
Making check in obelib
make[1]: Entering directory `/home/jamest/obelisk/obelib'
make  test test2
make[2]: Entering directory `/home/jamest/obelisk/obelib'
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/lib/glib/include    -g -O2 -c
test.c
/bin/sh ../libtool --mode=link gcc  -g -O2  -o test  test.o libobe.la  
gcc -g -O2 -o .libs/test test.o .libs/libobe.so -lglib -lgmodule -lexpat
-Wl,--rpath -Wl,/usr/local/lib
.libs/libobe.so: undefined reference to `XML_SetElementHandler'
.libs/libobe.so: undefined reference to `XML_Parse'
.libs/libobe.so: undefined reference to `XML_ParserFree'
.libs/libobe.so: undefined reference to `XML_ErrorString'
.libs/libobe.so: undefined reference to `XML_ParserCreate'
.libs/libobe.so: undefined reference to `XML_SetUserData'
.libs/libobe.so: undefined reference to `XML_GetErrorCode'
.libs/libobe.so: undefined reference to `XML_GetCurrentLineNumber'
collect2: ld returned 1 exit status
make[2]: *** [test] Error 1
make[2]: Leaving directory `/home/jamest/obelisk/obelib'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/jamest/obelisk/obelib'
make: *** [check-recursive] Error 1


Any ideas on what I'm missing/doing wrong? 

TIA

->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<
James Thompson    138 Cardwell Hall  Manhattan, Ks   66506    785-532-0561 
Kansas State University                          Department of Mathematics
->->->->->->->->->->->->->->->->->->---<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<-<




xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list