我正在使用主机桌面在RaspberryPi上构建Qt,遵循这个指南https://wiki.qt.io/Raspberry_Pi_Beginners_Guide。
当使用make命令构建Qt时,我得到了一个奇怪的错误:
In file included from ../../include/QtXml/qxml.h:1:0,
from dom/qdom.cpp:54:
../../include/QtXml/../../src/xml/sax/qxml.h:121:5: error: function ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’ defaulted on its first declaration with an exception-specification that differs from the implicit declaration ‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’
Makefile:1338: recipe for target '.obj/qdom.o' failed
make[2]: *** [.obj/qdom.o] Error 1
make[2]: Leaving directory '/home/anon/opt/qt5/qtbase/src/xml'
Makefile:295: recipe for target 'sub-xml-make_first' failed
make[1]: *** [sub-xml-make_first] Error 2
make[1]: Leaving directory '/home/anon/opt/qt5/qtbase/src'
Makefile:46: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2一些规范: Host - Debian Jessie - Raspbian
我现在该怎么做?从头重新开始安装不会产生任何结果。
发布于 2017-03-06 07:35:25
第一个错误显然是由"QXmlAttributes::QXmlAttributes(QXmlAttributes&&)“声明中的冲突引起的
我也遇到了同样的错误:与隐式声明‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’不同的异常规范在函数‘QXmlAttributes::QXmlAttributes(QXmlAttributes&&)’的第一个声明中默认出现
我设法通过以下链接的推荐解决了这个问题:Cross compiling for Raspberry Error
解决方案是改变:
1.打开/qt5/qtbase/src/xml/sax/qxml.h文件
2.Change:"QXmlAttributes(QXmlAttributes &&) Q_DECL_NOTHROW =默认值“
to "QXmlAttributes(QXmlAttributes &&) =默认值“
希望这能有所帮助!
https://stackoverflow.com/questions/41160438
复制相似问题