I know that this topic has been discussed, but i really can't find a solution for my problem. I want to read data from an XML file with QDomDocument and i get errors of this type:
main.obj:-1: error: LNK2019: unresolved external symbol “__declspec(dllimport) public: class QDomElement __cdecl QDomNode::toElement(void)const “ (__imp_?toElement@QDomNode@@QEBA?AVQDomElement@@XZ) referenced in function “void __cdecl ListElements(class QDomElement,class QString,class QString)” (?ListElements@@YAXVQDomElement@@VQString@@1@Z)
I included
#include <QCoreApplication>
#include <QtXml/QtXml>
#include <QDebug>
and i also added Qt += xml to .pro file
You need to run qmake after you add modules into the .pro file (that will regenerate the makefile with the correct libraries added and then the linker will find those)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With