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