1. 程式人生 > >linux下編譯ZBar出錯 stdio2.h:140:1: error: expected identifier or ‘(’ before ‘{’ token

linux下編譯ZBar出錯 stdio2.h:140:1: error: expected identifier or ‘(’ before ‘{’ token

編譯ZBar時,./configure之後make時提示如下錯誤。

In file included from /usr/include/stdio.h:937:0,
                 from zbar/debug.h:60,
                 from zbar/scanner.c:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:140:1: error: expected identifier or ‘(’ before ‘{’ token

解決方法:

export CFLAGS="" //將CFLAGS環境變數置為空

然後重新 ./configure

此時再make,則會成功。