RapidXML - does not compile ?

Posted by milan on Stack Overflow See other posts from Stack Overflow or by milan
Published on 2010-04-04T18:04:32Z Indexed on 2010/04/04 18:23 UTC
Read the original article Hit count: 785

Filed under:
|

Hi,

I am novice to rapidXML but first impresion was not positive, I made simple Visual Studio 6 C++ Hello World Application and added RapidXML hpp files to project and in main.cpp I put:

#include "stdafx.h"

#include < iostream >
#include < string >
#include "rapidxml.hpp"

using namespace std;
using namespace rapidxml;

int main ( )
{
    char x[] = "<Something>Text</Something>\0" ; //<<<< funktioniert, aber mit '*' nicht
    xml_document<> doc ;
    doc.parse<0>(x) ;
    cout << "Name of my first node is: " << doc.first_node()->name() << endl ;
    xml_node<>* node = doc.first_node("Something") ;
    cout << "Node 'Something' has value: " << node->value() << endl ;
} 

And it does not compile, any help ? Is RapidXML possible to run with Visual Studio 6 ? Error I am getting are:

--------------------Configuration: aaa - Win32 Debug--------------------
Compiling...
rapidxml.cpp
c:\Parser\rapidxml.cpp(310) : error C2039: 'size_t' : is not a member of 'std'
c:\Parser\rapidxml.cpp(320) : error C2039: 'size_t' : is not a member of 'std'
c:\Parser\rapidxml.cpp(320) : error C2039: 'size_t' : is not a member of 'std'
c:\Parser\rapidxml.cpp(385) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(417) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(417) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(448) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(448) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(476) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(579) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(599) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(639) : see reference to class template instantiation 'rapidxml::memory_pool<Ch>' being compiled
c:\Parser\rapidxml.cpp(681) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(790) : see reference to class template instantiation 'rapidxml::xml_base<Ch>' being compiled
c:\Parser\rapidxml.cpp(700) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(790) : see reference to class template instantiation 'rapidxml::xml_base<Ch>' being compiled
c:\Parser\rapidxml.cpp(721) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(790) : see reference to class template instantiation 'rapidxml::xml_base<Ch>' being compiled
c:\Parser\rapidxml.cpp(751) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(790) : see reference to class template instantiation 'rapidxml::xml_base<Ch>' being compiled
c:\Parser\rapidxml.cpp(786) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(790) : see reference to class template instantiation 'rapidxml::xml_base<Ch>' being compiled
c:\Parser\rapidxml.cpp(787) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(790) : see reference to class template instantiation 'rapidxml::xml_base<Ch>' being compiled
c:\Parser\rapidxml.cpp(836) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(876) : see reference to class template instantiation 'rapidxml::xml_attribute<Ch>' being compiled
c:\Parser\rapidxml.cpp(856) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(876) : see reference to class template instantiation 'rapidxml::xml_attribute<Ch>' being compiled
c:\Parser\rapidxml.cpp(936) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(1345) : see reference to class template instantiation 'rapidxml::xml_node<Ch>' being compiled
c:\Parser\rapidxml.cpp(958) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(1345) : see reference to class template instantiation 'rapidxml::xml_node<Ch>' being compiled
c:\Parser\rapidxml.cpp(981) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(1345) : see reference to class template instantiation 'rapidxml::xml_node<Ch>' being compiled
c:\Parser\rapidxml.cpp(1004) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(1345) : see reference to class template instantiation 'rapidxml::xml_node<Ch>' being compiled
c:\Parser\rapidxml.cpp(1025) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(1345) : see reference to class template instantiation 'rapidxml::xml_node<Ch>' being compiled
c:\Parser\rapidxml.cpp(1045) : error C2039: 'size_t' : is not a member of 'std'
        c:\Parser\rapidxml.cpp(1345) : see reference to class template instantiation 'rapidxml::xml_node<Ch>' being compiled
Error executing cl.exe.

rapidxml.obj - 25 error(s), 0 warning(s)

© Stack Overflow or respective owner

Related posts about rapidxml

Related posts about c++