How about when you build, specify the include path:
gcc -I${XML_DIR}/include/libxml2 -L{XML_DIR}/lib -lxml2 -lz -lm -o file file.c
Thomas Floodeen, Jr.
Mentor Graphics BSD
720.494.1133
From: xml-bounces gnome org [mailto:xml-bounces gnome org]
On Behalf Of Tong Mao
Sent: Thursday, April 07, 2011 8:26 AM
To: xml gnome org
Subject: [xml] Question about the path of libxml2 library
Hello everyone,
Here I have a small question about the path of libxml2 library.
I need to modify my colleague's code, which use the libxml2 functions.
I already install the libxml2 packet. But got some errors for these lines(cannot find the files):
#include <libxml/parser.h>
#include <libxml/encoding.h>
#include <libxml/xmlwriter.h>
I find the default path for these headers are:" include/libxml2/libxml ", not " /include/libxml ".
I think I made some mistake, because every example online use these code: #include <libxml/xxx.h>
Should I "cp" libxml folder out, or change #include xxx? Or there's standard way to solve this problem?
Thank you very much for your help.
BR,
Tong