c++ ERROR libxml++ no such file or directory
HI,
I have the following: #include <libxml++/libxml++.h>
and when i compile it says fatal error: libxml++/libxml++.h.No such file o开发者_如何学Gor directory
. I've checked in the directory: /usr/include/libxml++-2.6/libxml++ and there it is the libxml++.h. Where am I wrong? why do i receive this error? thx
EDIT:
I did include g++ prg.cpp -o prg -I/usr/include/libxml++-2.6/ and now i have the
error:fatal error: glibmm/ustring.h: No such file or directory
You should use pkg-config to get the correct compiler options. See, for instance: http://developer.gnome.org/libxml++/stable/
Add the following option in the makefile:
g++ <some options> -I/usr/include/libxml++-2.6 <some other options>
The -I
flag in g++
adds the directory appearing after it to the include path
. If you do not want to use that option, you need to replace the #include<libxml++-2.6/libxml++.h>
with #include "absolute path to above header file"
. Note that using the -I
flag also allows you to replace " "
after the #include
with < >
tags.
add -I/usr/include/libxml++-2.6/libxml++
when compiling.
精彩评论