Rapid-XML Problem II
-
da ich den ursprünglichen Thread nicht mehr gefunden hab hier nochmal:
ich muss ne xml-datei parsen und mir wurde gesagt dass rapid-xml recht gut sei,
normalerweise muss man da ja nur die header einbinden...
hier das ergebnis mit
qt-creator#include <iostream> #include "../rapidxml-1.13/rapidxml.hpp" #include "../rapidxml-1.13/rapidxml_utils.hpp" #include "../rapidxml-1.13/rapidxml_print.hpp" #include "../rapidxml-1.13/rapidxml_iterators.hpp" int main() { return 0; }
ergibt:
Running build steps for project XML... Configuration unchanged, skipping QMake step. Starting: /usr/bin/make -w make: Entering directory `/media/LEXAR/MMSI/XML' g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I. -o main.o main.cpp In file included from main.cpp:5: ../rapidxml-1.13/rapidxml_iterators.hpp:21: error: expected nested-name-specifier ../rapidxml-1.13/rapidxml_iterators.hpp:21: error: invalid declarator before ‘value_type’ ../rapidxml-1.13/rapidxml_iterators.hpp:22: error: expected nested-name-specifier ../rapidxml-1.13/rapidxml_iterators.hpp:22: error: invalid declarator before ‘&’ token ../rapidxml-1.13/rapidxml_iterators.hpp:23: error: expected nested-name-specifier ../rapidxml-1.13/rapidxml_iterators.hpp:23: error: invalid declarator before ‘*’ token ../rapidxml-1.13/rapidxml_iterators.hpp:37: error: ISO C++ forbids declaration of ‘reference’ with no type ../rapidxml-1.13/rapidxml_iterators.hpp:37: error: expected ‘;’ before ‘operator’ ../rapidxml-1.13/rapidxml_iterators.hpp:43: error: expected ‘;’ before ‘pointer’ ../rapidxml-1.13/rapidxml_iterators.hpp:43: error: ISO C++ forbids declaration of ‘pointer’ with no type ../rapidxml-1.13/rapidxml_iterators.hpp:43: error: expected ‘;’ before ‘operator’ ../rapidxml-1.13/rapidxml_iterators.hpp:49: error: expected ‘;’ before ‘node_iterator’ ../rapidxml-1.13/rapidxml_iterators.hpp:100: error: expected nested-name-specifier ../rapidxml-1.13/rapidxml_iterators.hpp:100: error: invalid declarator before ‘value_type’ ../rapidxml-1.13/rapidxml_iterators.hpp:101: error: expected nested-name-specifier ../rapidxml-1.13/rapidxml_iterators.hpp:101: error: invalid declarator before ‘&’ token ../rapidxml-1.13/rapidxml_iterators.hpp:102: error: expected nested-name-specifier ../rapidxml-1.13/rapidxml_iterators.hpp:102: error: invalid declarator before ‘*’ token ../rapidxml-1.13/rapidxml_iterators.hpp:116: error: ISO C++ forbids declaration of ‘reference’ with no type ../rapidxml-1.13/rapidxml_iterators.hpp:116: error: expected ‘;’ before ‘operator’ ../rapidxml-1.13/rapidxml_iterators.hpp:122: error: expected ‘;’ before ‘pointer’ ../rapidxml-1.13/rapidxml_iterators.hpp:122: error: ISO C++ forbids declaration of ‘pointer’ with no type ../rapidxml-1.13/rapidxml_iterators.hpp:122: error: expected ‘;’ before ‘operator’ ../rapidxml-1.13/rapidxml_iterators.hpp:128: error: expected ‘;’ before ‘attribute_iterator’ make: *** [main.o] Error 1 make: Leaving directory `/media/LEXAR/MMSI/XML' Exited with code 2. Error while building project XML When executing build step 'Make
das .pro-file:
QT -= gui TARGET = XML CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp HEADERS += ../rapidxml-1.13/rapidxml.hpp \ ../rapidxml-1.13/rapidxml_utils.hpp \ ../rapidxml-1.13/rapidxml_print.hpp \ ../rapidxml-1.13/rapidxml_iterators.hpp
was ist da los ?!
was mach ich falsch?
-
Dieser Thread wurde von Moderator/in rüdiger aus dem Forum Themen rund um den PC in das Forum Compiler- und IDE-Forum verschoben.
Im Zweifelsfall bitte auch folgende Hinweise beachten:
C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?Dieses Posting wurde automatisch erzeugt.
-
kann keiner helfen?
dann muss ich nochmal nach alternativen xml-parsern fragen, welche einfach zu erlernen aber dennoch recht mächtig sind ...