DevC++中开启C11标准编译选项


在实验中要用到C11标准中的<std::future>异步执行,编译时出现如下错误

.\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\bits\c++0x_warning.h
[Error] #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

解决方法:

菜单栏>>工具>>编译选项>>编译时加入如下命令 (勾选)

-std=c++11

确定后再次编译程序,编译通过

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM