using libxml++ in Anjuta C++ project

Asked by Massimiliano Maniscalco

I'm developing a C++ project using Anjuta 3.0.0 and I need to use libxml++. I installed the package libxml++-2.6dev and I found the include in /usr/include/libxml++-2.6/libxml++. I added the library libxml++ to the project, but I always receive an error message when I try to include the header libxml++.h. The error message is fatal error: libxml++ file or directory doesn't exist.
How to configure Anjuta to find the include?
I tried to add to the C++ compiler options : -I /usr/include/libxml++-2.6, but it doesn't work. I got another error message.
Please help!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu anjuta Edit question
Assignee:
No assignee Edit question
Solved by:
Massimiliano Maniscalco
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

There should be no space after the -I before the path to the header files.

The next error you will get is after compilation, when the link will fail as you have not specified the library link flags i,e, the "-lxml++ -lxml2 -lz" bit (thats all lowercase "L"s there, not "eye"s).

Revision history for this message
Massimiliano Maniscalco (massi-neptune) said :
#2

I removed that space but nothing change, same error.
When I add the library to the project and I rebuild everything I get these error messages:
Makefile.am:5: libxml++-2.6_CFLAGS: non-POSIX variable name
Makefile.am:24: libxml++-2.6_LIBS: non-POSIX variable name

Then when I try to include <libxml++> I get this message:
main.cc:23:20: fatal error: libxml++: File o directory non esistente (File or directory doesn't exist)

Revision history for this message
Massimiliano Maniscalco (massi-neptune) said :
#3

Ok, I understood how to do.
My mistake was to choose "New library" from the Project menu when I wanted to add a library, but I should use "Add library". After choose the library, Anjuta will set up everything in automatic, no need to do anything more than that.
Hope this will be helpful to anyone who has the same problem like me.