problems with C++ and libxml on Windows

Discussion in 'C++' started by eleonora087, Aug 24, 2009.

  1. eleonora087

    eleonora087 New Member

    Joined:
    Aug 24, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi there.
    I'm italian (so, sorry for my bad english) and I'm new to this forum.

    I wanted to ask you a question. Your answer will help me with my thesis, so, thank you!!
    I'm writing an interface for a robotic wheelchair controlled by a BCI system. The problem is: the interface is running on Ubuntu, and the BCI system used is based on windows. I exported the classes that are related to the BCI system, but I've a serious problem with XML! I mean: when I try to open an XML file the program crashes. This is the code:

    Code:
    #include <libxml/tree.h>
    #include <libxml/parser.h>
    ...
        xmlDocPtr     XMLdocument;
        const char*   fileName = "myDestinations.xml";
        
        XMLdocument = xmlReadFile (fileName, NULL, 0);
        
        if (XMLdocument == NULL)
           cout << "Failed to open file!\n";
    Now, I'm using the Dev-C++ compiler (that is ok with the other libraries). It hasn't the XML libraries installed, so I took the libraries package, "LibXML2 for dev-c++", and I installed it. It didn't work, so I took also iconv and zlib libraries. In this case the compiler made the executable file, but when I press "Run", the window "Windows has encountered a problem blah blah blah" appears. I made a debug of the code, and I noticed that it crashes when I write the "xmlReadFile" instruction.

    Do you have any ideas about the problem? Or if I can find other libraries?
    Thank you in advance!

    Eleonora
     
  2. it career

    it career New Member

    Joined:
    Apr 8, 2007
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Web Designing
    Home Page:
    http://ijug.net/
    Download source code and compile it in windows, if you cannot search for a windows xml library.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice