RaspberryPi上的QT -QXMLATTRIBUTS隐式声明

Qt on RaspberryPi - QXmlAttributes implicit declaration

本文关键字:声明 -QXMLATTRIBUTS 上的 QT RaspberryPi      更新时间:2023-10-16

我正在使用主机桌面在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

一些规范:主持人 - Debian Jessierpi -raspbian

我现在该怎么办?从头重新启动安装一无所获。

第一个错误显然是由声明" qxmlattributes :: qxmlattributes(qxmlattributes&&&&&quort)造成的。;)'

我设法通过以下链接中遵循Rocommendations:Raspberry错误

来解决此问题

解决方案是更改:

1.open the/qt5/qtbase/src/xml/sax/qxml.h file

2. change:'qxmlattributes(qxmlattributes&&)q_decl_nothrow = default&quote&quort;

to 'qxmlattributes(qxmlattributes&&)=默认值;

希望这会有所帮助!