Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » libxml++ namespace not found(xmlpp:: not resolved)
libxml++ namespace not found [message #1018992] Thu, 14 March 2013 21:28 Go to next message
Adam Levine is currently offline Adam Levine
Messages: 2
Registered: March 2013
Junior Member
Hello:

I am attempting to experiment with libxml++ on a unbuntu 12.04 machine.
I have downloaded the library and started a C++ project with the wizard.
I am trying to run the DOMParser example so I pasted it into the cpp file.
_https ://developer.gnome.org/libxml++-tutorial/stable/chapter-parsers.html
I have put the `pkg-config libxm++-2.6 --cflags --libs` in the command line (using GUI)
This appears with to work with includes as it does find all headers from the single <libxml++/libxml++.h> include.

The problem I am having is that it does not "see" the xmlpp:: namespace, or for that matter the Glib:: namespace.
The compiler errors are of the form:
"error: 'class xmlpp::DomParser' has no member named 'set_throw_messages'
Hovering over any of the other errors in the editor gives something like:
"Type 'xml::ContentNode' could not be resolved"
or
"Type 'Glib::ustring' could not be resolved"
Althouth it has been quite a few years since I have done C++ (off on C# .NET and C) and I have only used eclipse for straight C projects... I think the compiler is unable to resolve the namespaces from the two "non-standard" libraries (libxml++, and glib).
The compiler/editor does see the std namespace and I have done a couple simple C++ projects without a problem.
If someone can help me resolve this issue I would appreciate it.
BTW, I have been spoiled by IDE's and GUI's so I am trying to resolve this within
eclipse IDE.

Thanks in advance, my apologies for the long description.

Adam
Re: libxml++ namespace not found [message #1019458 is a reply to message #1018992] Fri, 15 March 2013 18:29 Go to previous message
Adam Levine is currently offline Adam Levine
Messages: 2
Registered: March 2013
Junior Member
I "fixed" the problem with finding xmlpp namespace.
I needed to add -std=c++0x to Project Properties->C/C++ Build ->Settings->Tool Settings->GCC C++ Compiler->Miscellaneous->Other Flags.
http://wiki.eclipse.org/CDT/User/FAQ#What_is_the_CDT.3F

I still can't get it to see Glib namespace.
I thought that might be because I didn't have the glib dev packages installed.
I installed these and still it does not see the Glib namespace.

(Also getting "must implement virtual functions..." on xmlpp stuff but this seems to me a language issue with the example not tools set-up.)

Any help still appreciated.

Adam
Previous Topic:HelloWorld Program not outputting?
Next Topic:Indent with tabs do not work
Goto Forum:
  


Current Time: Sat Oct 25 09:03:39 GMT 2014

Powered by FUDForum. Page generated in 0.01773 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software