想移植一些windows下的程序到linux下。如何搭建环境?
时间:2011-10-26
来源:互联网
error: 'for' loop initial declarations are only allowed in C99 mode
note: use option -std=c99 or -std=gnu99 to compile your code
例如代码如下
怎么弄可以让make的时候不提示这个错误呢?习惯了在for的括号里面初始化变量了
note: use option -std=c99 or -std=gnu99 to compile your code
例如代码如下
代码:
for(int i = 0; i<5; i++)
{
printf("%d\n",i);
}
{
printf("%d\n",i);
}
怎么弄可以让make的时候不提示这个错误呢?习惯了在for的括号里面初始化变量了

作者: jun_ 发布时间: 2011-10-26
use option -std=c99 or -std=gnu99 to compile your code
作者: JiangHui 发布时间: 2011-10-26
JiangHui 写道:
use option -std=c99 or -std=gnu99 to compile your code
Are there any other solutions? such as set up sth so that I don't need to type the "-std=c99" every time. Can I set the C99 as default?
BTW:Since the C99 is not the default so which is default?
作者: jun_ 发布时间: 2011-10-26
JiangHui 写道:
use option -std=c99 or -std=gnu99 to compile your code
刚试了一下,提示这个耶...怎么办?
make oldman -std=c99
make:无效选项 -- =
make:无效选项 -- c
make:无效选项 -- 9
make:无效选项 -- 9
用法:make [选项] [目标] ...
作者: jun_ 发布时间: 2011-10-26
你要用make就先写makefile啊,-std=c99是gcc的编译选项
作者: JiangHui 发布时间: 2011-10-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28