[SOLVED] - XML parser functionality in Qt project using libxml2



  • I'm working on Windows XP and downloaded libxml2-2.7.8.win32.zip, zlib-1.2.5.win32.zip, and iconv-1.9.2.win32.zip.
    I would like to read a .xml file in Qt project using libxml2.

    How to add these libxml related .dll/,lib and .h reference in Qt project to achieve the XML parsing.

    .xml exists in my application root folder.


  • Lifetime Qt Champion

    Hi,

    Isn't it almost the same question as "this one":http://qt-project.org/forums/viewthread/31840/ ?



  • Hello,
    you can add dll and lib files in .pro file of your project (just go through qmake tutorial where it is described in details). And for atcual parsing you can create some "wrapper" class which will take say QString and pass QString::toStdString() to libxml or QString::toUtf8().data() if you need char*.



  • Thanks for all the received replies.

    Yes, I've put respective .dll, .lib files (libxml2 external libraries in this case) into a separate folder and performed proper reference in my .pro file. It worked as expected.

    I suppose no proper availability of dll, lib files @ runtime is the reason for 'Exited with code -XXXXXXX1515' ERROR in Qt.


  • Lifetime Qt Champion

    Indeed, if dlls are missing from the path, they can't be loaded when calling a function they implement thus the error.


Log in to reply