If you were using qmake, you would have to add "QT += xml" to your .pro file.

Try adding defining QT_XML_LIB macro.