求助,在编译工程时,出现“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 "(
...全文
11997 7 打赏 收藏 转发到动态 举报
AI 作业
写回复
用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
  • 打赏
  • 举报
回复
偶遇到类似问题都是用 “每次用/*...*/注释掉不同部分再重新编译,直到定位到具体语法出错的位置。” 的方法解决的。
r18_ap6330的步骤.txt 2017/2/9 10:47 开始整理 原始SDK默认配置为rtl8723bs,现在要修改为:AP6330。 硬件平台:全志R18。 开发板:DP-18 SDK:Android6.0.1/Linux3.10.65(v2.1版本,发布日期20161008) WIFI测试需要支持5.8G的AP来测试。BT用普通的Android手机发送图片即可。 1、请严重注意全志R18的架构选择:ARCH=arm64 rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/lichee/linux-3.10$ rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/lichee/linux-3.10$ make ARCH=arm64 menuconfig rootroot@cm-System-Product-Name:/home/wwt/dp18_ap6330/lichee/linux-3.10$ WIFI部分可以关闭realtek: Device Drivers ---> [*] Network device support ---> [*] Wireless LAN ---> Realtek 8723B SDIO or SPI WiFi Realtek 8723BS_VQ0 WiFi Realtek 8189F SDIO WiFi Realtek 8723C SDIO or SPI WiFi 可以配置内核打印级别为18(默认为17?) General setup ---> (18) Kernel log buffer size (16 => 64KB, 17 => 128KB) 2、 Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\BoardConfig.mk 关闭这里: # BOARD_WIFI_VENDOR := realtek 打开这里: BOARD_WIFI_VENDOR := broadcom 蓝牙的修改: ##BOARD_HAVE_BLUETOOTH_BCM := true BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs_vq0 BOARD_HAVE_BLUETOOTH_RTK_COEX := true BOARD_HAVE_BLUETOOTH_RTK := true BLUETOOTH_HCI_USE_RTK_H5 := true 修改为: BOARD_HAVE_BLUETOOTH_BCM := true BOARD_HAVE_BLUETOOTH_NAME := ap6330 #BOARD_HAVE_BLUETOOTH_NAME := rtl8723bs_vq0 #BOARD_HAVE_BLUETOOTH_RTK_COEX := true #BOARD_HAVE_BLUETOOTH_RTK := true #BLUETOOTH_HCI_USE_RTK_H5 := true 3、 Z:\home\wwt\dp18_ap6330\android\device\softwinner\tulip-d1\init.sun50iw1p1.rc 蓝牙部分: #bluesleep insmod /system/vendor/modules/rtl_btlpm.ko 修改为: #bluesleep #insmod /system/vendor/modules/rtl_btlpm.ko #network insmod /system/vendor/modules/bcmdhd.ko insmod /system/vendor/modules/bcm_btlpm.ko WIFI部分: 关闭这里: # 1. realtek & eagle wifi service # 1.1 realtek & eagle wifi sta service service wpa_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -I/system/etc/wifi/wpa_supplicant_overlay.conf \ -O/data/misc/wifi/sockets \ -e

65,201

社区成员

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

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