在代码块中启用严格的ISO标准时,在C中发出警告 [英] Warning in C when strict ISO standards enabled in Code Blocks

查看:93
本文介绍了在代码块中启用严格的ISO标准时,在C中发出警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

命令行选项"-std = c ++ 0x"对C ++/ObjC ++有效,但对C无效...这是什么意思?

command line option "-std=c++0x" is valid for C++/ObjC++ but not for C...what''s this about?

推荐答案

与gcc有关吗?
如果是这样,gcc是几种语言编译器的前端,一个是C,另一个是C ++,等等.
您可以选择将适当的命令行选项传递给编译器.
如果编译C代码,请使用正确的命令行选项:C ++ 11(或类似)肯定不是C选项.
另一方面,您可以尝试使用C ++编译器编译C代码.
另请参见 CodeBlocks,GCC:更改项目语言c和c ++? [ ^ ].

干杯
安迪
Is it about gcc?
If so, gcc is a frontend for several language compilers, one being C, another C++, etc.
It''s your choice to pass the appropriate command line options to the compiler.
If you compile C code, use the right command line options: C++11 (or alike) are for sure not C options.
On the other hand, you might try to compile the C code with the C++ compiler.
See also CodeBlocks, GCC: change project language c and c++?[^].

Cheers
Andi


这篇关于在代码块中启用严格的ISO标准时,在C中发出警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆