Re: [xml] [textXPath.c] unable to find libxml.h



Hi Santosh,

On Sun, Nov 7, 2010 at 5:22 AM, Santosh Mahale  wrote:
I downloaded libxml2 from ftp://xmlsoft.org/libxml2/ and installed using
./configure, make, sudo make install sequence. post that i am trying to
compile the textXPath.c file from the examples folder using the following
gcc testXPath.c -l libxml2 -I /usr/local/include/libxml2
But it throws an error libxml.h: No such file or directory.

If you used the default options for configure, the install prefix is
probably /usr, not /usr/local.
This means that libxml2 headers are in /usr/include/libxml2/libxml
The usual way for using libxml2 headers is to specify -I
/usr/include/libxml2 and

#include <libxml/parser.h>
or
#include <libxml/reader.h>
or some other header.

Note that there is no libxml.h installed. You cannot include libxml.h
in your program.
You need to include some other header
(parser.h/tree.h/reader.h/SAX2.h), depending of the libxml2
functionality you want to use.

Hope this helps,
Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds



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