错误:“提振:: Q_FOREACH”尚未声明 [英] error: ‘boost::Q_FOREACH’ has not been declared

查看:826
本文介绍了错误:“提振:: Q_FOREACH”尚未声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用升压1.54和Qt版本5.2.1。

I'm using boost 1.54 and Qt version 5.2.1.

我收到以下错误,当我尝试建立包

I'm getting the following error when I try to build the package

/usr/include/boost/multi_index/sequenced_index.hpp:927:10: error: 'boost::Q_FOREACH’ has not been declared
 boost::foreach::tag
        ^

/usr/include/boost/multi_index/ordered_index.hpp:1399:10: error: ‘boost::Q_FOREACH’ has not been declared
 boost::foreach::tag)
    ^

经过在 sequenced_index.hpp ordered_index.hpp 标题,它们都具有 foreach_fwd.hpp foreach.hpp 在内。
我试着包括 CONFIG + = no_keywords 在项目文件(亲)。而我依然收到此错误。我不知道是什么原因。

Checked the header in sequenced_index.hpp, ordered_index.hpp, they both have foreach_fwd.hpp and foreach.hpp included. I tried including CONFIG += no_keywords in the project file (.pro). But still I'm getting this error. I'm not sure what's the reason.

推荐答案

有关记录,这个问题已经的规避为即将到来的升压1.60版本,这样就可以让Qt的定义宏的foreach

For the record, this problem has been circumvented for the upcoming Boost 1.60 release so that you can let Qt define the macro foreach.

这篇关于错误:“提振:: Q_FOREACH”尚未声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆