首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Qt on RaspberryPi - QXmlAttributes隐式声明

Qt on RaspberryPi - QXmlAttributes隐式声明
EN

Stack Overflow用户
提问于 2016-12-15 17:19:42
回答 1查看 304关注 0票数 1

我正在使用主机桌面在RaspberryPi上构建Qt,遵循这个指南https://wiki.qt.io/Raspberry_Pi_Beginners_Guide

当使用make命令构建Qt时,我得到了一个奇怪的错误:

代码语言:javascript
复制
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

我现在该怎么做?从头重新开始安装不会产生任何结果。

EN

回答 1

Stack Overflow用户

发布于 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 &&) =默认值“

希望这能有所帮助!

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41160438

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档