当前位置: 动力学知识库 > 问答 > 编程问答 >

Qt how to read an XML?

问题描述:

SOLUTION: I had to add Qt += xml to my .pro file

here's my problem:

myClass.h:

#include <QtXml/QDomDocument>

#include <QtXml/qdom.h>

[...]

myClass.cpp

[...]

QDomDocument doc("test");

[...]

on build I get the error:

collect2:ld returned 1 exit status

What's wrong with this ?

Thanks in advance.

P.S.: Qt-Creator 2.0.1, Windows 7 x64 Pro.

网友答案:

I had to add Qt += xml to my .pro file.

网友答案:

Based on your error message I assume you aren't linking to QtXML. I haven't used Qt-Creator, but I believe there is a simple way to activate/deactivate components of Qt for your program.

分享给朋友:
您可能感兴趣的文章:
随机阅读: