Re: [xml] Trouble compiling a library



On 7/11/2012 11:03, michael jerusalmi steria com wrote:
[emmji xml]$ gcc -c lib.c
In file included from lib.h:25,
                  from lib.c:24:
libxml2-2.7.8/include/libxml/parser.h:15:31: error: libxml/xmlversion.h: No such file or directory

It expects libxml's "include" directory to be in the include path. If you compile with
-I libxml2-2.7.8/include
and use the same path in your own code, like
#include "libxml/parser.h"
it should work.

If libxml's fully installed, you can also use xml2-config to make the right flags automatically:
xml2-config --cflags

Jason




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