qtcreator 5.9.8中新建项目,手动添加了Features类,之后有很多error: missing binary operator before token “(“报错

4 篇文章 0 订阅

qtcreator 5.9.8中新建项目,手动添加了Features类,之后有很多error: missing binary operator before token "("报错

/usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:44: error: missing binary operator before token “(”
#if __GLIBC_PREREQ(2,15) && defined(_GNU_SOURCE)
^
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:56: error: missing binary operator before token “(”
#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
^
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:56: error: missing binary operator before token “(”
#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
^
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:73: error: missing binary operator before token “(”
#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
^
/usr/include/string.h:36: error: missing binary operator before token “(”
#if defined __cplusplus && (__GNUC_PREREQ (4, 4)
^
/usr/include/string.h:36: error: missing binary operator before token “(”
#if defined __cplusplus && (__GNUC_PREREQ (4, 4)
^
/usr/include/string.h:53: error: missing binary operator before token “(”
#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)
^
/usr/include/string.h:165: error: missing binary operator before token “(”
|| __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X))
^
/usr/include/string.h:165: error: missing binary operator before token “(”
|| __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X))
^
/usr/include/string.h:174: error: missing binary operator before token “(”
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)
^
/usr/include/string.h:174: error: missing binary operator before token “(”
#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)
^
/usr/include/string.h:492: error: missing binary operator before token “(”
#if __GNUC_PREREQ (3,4)
^
/usr/include/string.h:492: error: missing binary operator before token “(”
#if __GNUC_PREREQ (3,4)
^
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:56: error: missing binary operator before token “(”
#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
^
编译报错
查了很多网站,有人提到,可能是再顶部包含了features.h。因为新建的类,qtcreator会自动创建头文件。
https://stackoverflow.com/questions/29645238/what-is-the-purpose-of-features-h-header
网站里提到了features.h是一个系统的头文件,所以是重名了。最后把类改个名字就可以了。

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值