codeblocks中添加-std=c99

简介: 早上用codeblocks编译一个c文件,出现这样一个编译错误: +'for'+loop+initial+declarations+are+only+allowed+in+C99+mode        原来codeblocks的gcc默认不以c99标准编译c文件,需要设置一下,具体如下: 1.

   早上用codeblocks编译一个c文件,出现这样一个编译错误:

+'for'+loop+initial+declarations+are+only+allowed+in+C99+mode

 

     原来codeblocks的gcc默认不以c99标准编译c文件,需要设置一下,具体如下:

1. 在Settings菜单栏下找到Compiler…菜单项,如下图:

 

 

 

2.在Global compiler setting中选择Compiler settings选项卡,在Other options中填入:-std=c99,如下图:


 

相关文章
|
8月前
Boost(MSVC编译)+使用信号槽
天天看QT的信号槽,突然发现boost中也有信号槽,所以想试试boost的信号槽,尝试一下。需要先对boost进行编译,之后我会使用信号槽作为演示代码。
90 0
|
10月前
|
iOS开发 MacOS
MacOS Clion 使用<bits/stdc++.h>万能头提示 fatal error: ‘bits/stdc++.h‘ file not found
MacOS Clion 使用<bits/stdc++.h>万能头提示 fatal error: ‘bits/stdc++.h‘ file not found
695 0
|
C++
万能头文件#include<bits/stdc++.h>
#include<bits/stdc++.h>这个头文件的含义
201 1
test\fmw\gtest\include\gtest/gtest-printers.h(714) : error C2977: “std::tuple”: 模板 参数太多
test\fmw\gtest\include\gtest/gtest-printers.h(714) : error C2977: “std::tuple”: 模板 参数太多
88 0
|
计算机视觉
【opencv】无法打开源文件opencv2/nonfree/features2d.hpp
【opencv】无法打开源文件opencv2/nonfree/features2d.hpp
344 0
【opencv】无法打开源文件opencv2/nonfree/features2d.hpp
|
C语言 C++
VS2019 添加bits/stdc++.h万能头文件库
VS2019 添加bits/stdc++.h万能头文件库
747 0
VS2019 添加bits/stdc++.h万能头文件库
|
编译器 C++
万能头文件#include“bits/stdc++.h”
万能头文件#include“bits/stdc++.h”
306 0