Closed skyformat99 closed 2 years ago
1) git clone latest code 2)cmake .. 3)make
compile error: /n2n/tools/n2n-portfwd.c: 在函数‘main’中: /n2n/tools/n2n-portfwd.c:324:21: 错误:只允许在 C99 模式下使用‘for’循环初始化声明 for (char p = udp_buf; (p = strchr(p, '\n')) != NULL; p++) p = ' '; ^ /n2n/tools/n2n-portfwd.c:324:21: 附注:使用 -std=c99 或 -std=gnu99 来编译您的代码
/n2n/tools/n2n-route.c: 在函数‘main’中: /n2n/tools/n2n-route.c:759:21: 错误:只允许在 C99 模式下使用‘for’循环初始化声明 for (char p = udp_buf; (p = strchr(p, '\n')) != NULL; p++) p = ' '; ^ /n2n/tools/n2n-route.c:759:21: 附注:使用 -std=c99 或 -std=gnu99 来编译您的代码
1) git clone latest code 2)cmake .. 3)make
compile error: /n2n/tools/n2n-portfwd.c: 在函数‘main’中: /n2n/tools/n2n-portfwd.c:324:21: 错误:只允许在 C99 模式下使用‘for’循环初始化声明 for (char p = udp_buf; (p = strchr(p, '\n')) != NULL; p++) p = ' '; ^ /n2n/tools/n2n-portfwd.c:324:21: 附注:使用 -std=c99 或 -std=gnu99 来编译您的代码
/n2n/tools/n2n-route.c: 在函数‘main’中: /n2n/tools/n2n-route.c:759:21: 错误:只允许在 C99 模式下使用‘for’循环初始化声明 for (char p = udp_buf; (p = strchr(p, '\n')) != NULL; p++) p = ' '; ^ /n2n/tools/n2n-route.c:759:21: 附注:使用 -std=c99 或 -std=gnu99 来编译您的代码