I have been having some trouble using RapidXML to parse a string. I receive an error from within Eclipse claiming the parse function does not exist.
make all
Building file: ../search.cpp
Invoking: Cross G++ Compiler
g++ -DDEBUG -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"search.d" -MT"search.d" -o "search.o" "../search.cpp"
../search.cpp: In function ‘void search(CURL*, CURLcode, std::string, std::string)’:
../search.cpp:29:27: error: no matching function for call to ‘rapidxml::xml_document<>::parse(const char*)’
../search.cpp:29:27: note: candidate is:
../rapidxml-1.13/rapidxml.hpp:1381:14: note: template<int Flags> void rapidxml::xml_document::parse(Ch*) [with int Flags = Flags, Ch = char]
make: *** [search.o] Error 1
The following code raises an error:
rapidxml::xml_document<> doc; // This has no errors
doc.parse<0>(data.c_str()); // This line raises the error (data is a string)
For reference here is the online documentation: http://rapidxml.sourceforge.net/manual.html#namespacerapidxml_1parsing
RapidXML comes as four header files:
- rapidxml_iterators.hpp
- rapidxml_print.hpp <--contains errors, but build is successful with them
- rapidxml_utils.hpp <--contains errors, but build is successful with them
- rapidxml.hpp <--linked by program, contains parse function
How do I resolve the error in my code, and do I first need so resolve compiler errors in the headers somehow?