求助,在编译工程时,出现“error: missing binary operator before token "("”

moritz_dev 2013-07-03 03:08:01
在open suse 12.3 64位的gcc 4.7环境下编译自己工程时,出现大量,error: missing binary operator before token "(" 求高手解答是什么问題。

自己也偿试在google中寻求答案,似乎是gcc的一个bug,但也未找到解决方案。

/usr/include/wchar.h:74:43: error: missing binary operator before token "("
In file included from /usr/include/sched.h:42:0,
from /usr/include/pthread.h:23,
from /usr/include/c++/4.7/x86_64-suse-linux/bits/gthr-default
.h:41,
from /usr/include/c++/4.7/x86_64-suse-linux/bits/gthr.h:151,
from /usr/include/c++/4.7/ext/atomicity.h:34,
from /usr/include/c++/4.7/bits/basic_string.h:41,
from /usr/include/c++/4.7/string:54,
from /home/moritz100001/workstation/src/external/jsoncpp/src
/../include/value.h:5,
from /home/moritz100001/workstation/src/external/jsoncpp/src
/../include/reader.h:5,
from /home/moritz100001/workstation/src/external/jsoncpp/src/
json_reader.cpp:1:
/usr/include/bits/sched.h:132:20: error: missing binary operator before token
"("
/usr/include/bits/sched.h:170:20: error: missing binary operator before token
"("
In file included from /usr/include/libio.h:57:0,
from /usr/include/stdio.h:74,
from /usr/include/c++/4.7/cstdio:44,
from /home/moritz100001/workstation/src/external/jsoncpp/src/
json_reader.cpp:4:
/usr/include/sys/cdefs.h:42:20: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:55:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:60:44: error: missing binary operator before token "("
/usr/include/sys/cdefs.h:145:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:158:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:220:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:229:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:236:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:245:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:254:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:266:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:276:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:285:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:293:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:307:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:315:19: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:323:44: error: missing binary operator before token "
("
/usr/include/sys/cdefs.h:343:19: error: missing binary operator before token "(
...全文
12975 7 打赏 收藏 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
ztenv 版主 2014-04-03
  • 打赏
  • 举报
回复
应该是自己程序符号的问题,仔细找找;还有一种可能是系统头文件被破坏了,可以这与个简单的程序测试;
dos5gw 2014-04-03
  • 打赏
  • 举报
回复
可能少分号,少引号, 宏展开也可能导致
tiannailu 2014-04-03
  • 打赏
  • 举报
回复
";"的问题吧,是不是有什么地方忘记了。
glacier123 2014-04-03
  • 打赏
  • 举报
回复
放到usr/local/inlcude下
moritz_dev 2013-07-03
  • 打赏
  • 举报
回复
但是都系统头文件出了问题
图灵狗 2013-07-03
  • 打赏
  • 举报
回复
应该是缺少哪些宏定义而造成的。
赵4老师 2013-07-03
  • 打赏
  • 举报
回复
偶遇到类似问题都是用 “每次用/*...*/注释掉不同部分再重新编译,直到定位到具体语法出错的位置。” 的方法解决的。

65,213

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧