gpt4 book ai didi

c++ - Qt on RaspberryPi - QXmlAttributes 隐式声明

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:08:51 26 4
gpt4 key购买 nike

我正在按照本指南使用主机桌面在 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 - 树莓派

我现在该怎么办?从头开始重新安装什么也没有。

最佳答案

第一个错误显然是由“QXmlAttributes::QXmlAttributes(QXmlAttributes&&)”声明中的冲突导致的

我有同样的错误:函数'QXmlAttributes::QXmlAttributes(QXmlAttributes&&)'在其第一个声明中默认使用不同于隐式声明'QXmlAttributes::QXmlAttributes(QXmlAttributes&&)'的异常规范

我通过以下链接中的 rocommendations 设法解决了这个问题:Cross compiling for Raspberry Error

解决方案是改变:

1.打开/qt5/qtbase/src/xml/sax/qxml.h文件

2.更改:"QXmlAttributes(QXmlAttributes &&) Q_DECL_NOTHROW = default"

“QXmlAttributes(QXmlAttributes &&) = default”

希望对您有所帮助!

关于c++ - Qt on RaspberryPi - QXmlAttributes 隐式声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41160438/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com