[xml] Problems linking



Hi there 
I am trying to compile the tutorial examples from the libxml website,
and I am having some trouble with the linker. I can't figure out what
to do.  Any help would be appreciated. Here are some pertiments...

The machine that gave the following is running Redhat7.3, but the
following story is pretty much consistent across 3 machines all with 
different distros and different installed levels of libxml

The file I am trying to compile has these includes:
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>


I compile with the following, and I can tell you that the compiler
does see the header files in /usr/lib/libxml2/libxml.

[torenvliet rtbuteo parseSchedule]$ gcc parseSchedule.c      
-I/usr/include/libxml2
/tmp/cctbpP31.o: In function `parseStory':
/tmp/cctbpP31.o(.text+0x27): undefined reference to `xmlStrcmp'
/tmp/cctbpP31.o(.text+0x43): undefined reference to
`xmlNodeListGetString'
/tmp/cctbpP31.o(.text+0x69): undefined reference to `xmlFree'
/tmp/cctbpP31.o: In function `parseDoc':
/tmp/cctbpP31.o(.text+0x91): undefined reference to `xmlParseFile'
/tmp/cctbpP31.o(.text+0xc7): undefined reference to
`xmlDocGetRootElement'
/tmp/cctbpP31.o(.text+0xf6): undefined reference to `xmlFreeDoc'
/tmp/cctbpP31.o(.text+0x113): undefined reference to `xmlStrcmp'
/tmp/cctbpP31.o(.text+0x13d): undefined reference to `xmlFreeDoc'
/tmp/cctbpP31.o(.text+0x16b): undefined reference to `xmlStrcmp'
/tmp/cctbpP31.o(.text+0x19b): undefined reference to `xmlFreeDoc'
collect2: ld returned 1 exit status

These are my installed rpms:

[torenvliet rtbuteo parseSchedule]$ rpm -qa |grep libxml
libxml-1.8.17-3
libxml2-devel-2.4.19-4
libxml2-2.4.19-4
perl-libxml-enno-1.02-15
libxml10-1.0.0-8
libxml-devel-1.8.17-3
perl-libxml-perl-0.07-14


These are the libraries I have installed in /usr/lib:
[torenvliet rtbuteo lib]$ ls libxml*
libxml2.a   libxml2.so    libxml2.so.2.4.19  libxml.la  libxml.so.0     
libxml.so.1
libxml2.la  libxml2.so.2  libxml.a           libxml.so  libxml.so.0.0.0 
libxml.so.1.8.17
[torenvliet rtbuteo lib]$ pwd
/usr/lib
[torenvliet rtbuteo lib]$




-- 
Nick Torenvliet B.A.,B.Eng.
FieldStone Solutions
www.fieldstonesolutions.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]