Centos编译时出现如下错误
misc.c: In function ‘eval_get_next_function_token’:
misc.c:260:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int i = token_index + 1; i < ctx->stack.values_num; i++)
^
misc.c:260:2: note: use option -std=c99 or -std=gnu99 to compile your code
make[3]: *** [misc.o] Error 1
解决方式:
在./configure时加入
./configure CFLAGS="-g -O2 -std=gnu99" --prefix=************