我正在尝试使用 gcc -g -Wall -Wextra -DNDEBUG -pedantic -ansi 标志编译代码并使用 libev 库。我在eclipse中收到以下错误:
Description Resource Path Location Type
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ Project line 827, external location: /usr/include/ev.h C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ Project line 820, external location: /usr/include/ev.h C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ Project line 821, external location: /usr/include/ev.h C/C++ Problem
make: *** [src/Object/MySockets/MySockets.o] Error 1 Project C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘struct’ Project line 551, external location: /usr/include/ev.h C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’ Project line 559, external location: /usr/include/ev.h C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unsigned’ Project line 825, external location: /usr/include/ev.h C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unsigned’ Project line 826, external location: /usr/include/ev.h C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ Project line 822, external location: /usr/include/ev.h C/C++ Problem
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ Project line 823, external location: /usr/include/ev.h C/C++ Problem
我已经在 ubuntu 中安装了 libev-dev 包。