天天看点

错误:QtXml: No such file or directory

错误

:QtXml: No such file or directory

但是在头文件中已经包含

QDomDocument

QtXml

的头文件了

#include <QDomDocument>
#include <QtXml>
           

解决办法:在工程文件xxx.pro中添加一项QT +=xml即可

QT +=core gui\
    xml     
           

注意要重新执行qmake(Qt Creator右键项目)

qmake,根据实际环境创建项 目文件.pro 并且运行qmake生成适当的Makefile 构建:构建是增量编译,只编译有变化部分

重新构建: 是把所有部分都重新编译

运行: 有改动则根据已有的Makefile进行编译,执行

构建和重新构建时如果没有Makefile,会根据.pro文件等生成Makefile后再编译

参考资料

https://blog.csdn.net/qq_17278169/article/details/54233633

https://blog.csdn.net/liuligui5200/article/details/46864947/

Qt

继续阅读