在settings.json里添加 {"C_Cpp.default.cStandard":"gnu99"} 关键是那个gnu,因为getopt.h是unix c标准里的,在standard c库里
= 0 configure:6642: result: yes configure:6660: checking whether optind is declared configure:6660: gcc -c -I/usr/local/Cellar/libevent/2.1.8/include conftest.c >&5 configure:6660: $? = 0 configure:6660: result: yes configure:6678: checking whether optreset is declared configure:6678: ...