错误“标记不是预处理器子表达式中的有效二元运算符" [英] Error "token is not a valid binary operator in a preprocessor subexpression"

查看:138
本文介绍了错误“标记不是预处理器子表达式中的有效二元运算符"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我构建并运行一个项目,基本上是由 Mac OS 10.6 上的 Qt 框架生成的存根,我会得到以下错误输出:

if I build and run a project, basically a stub generated by the Qt framework on Mac OS 10.6, I get this error output:

/Users/home/Qt5.0.1/5.0.1/clang_64/include/QtCore/qisenum.h:53: Error:token is not a valid binary operator in a preprocessor subexpression
#    if __has_extension(is_enum)
    ~~~~~~~~~~~~~~~^

我找不到解决方案,尽管我读到其他 Mac 用户似乎也有同样的问题.有大佬知道怎么解决吗?

I can´t find a solution to this, although I read that other Mac users seem to have the same problem. Anyone knows how to solve this?

推荐答案

我找到了解决方案.只需复制最新的 qisenum.h 文件 从这里 并将其替换为 clang_64Qt 创建者安装中的/include/QtCore 文件夹,它会正常工作.

I have found the solution. Just copy the latest qisenum.h file from here and replace it in clang_64/include/QtCore folder in your Qt creator installation, it will work fine.

这篇关于错误“标记不是预处理器子表达式中的有效二元运算符"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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