且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Qt Creator 5.0中设置c ++ 11

更新时间:2021-09-20 22:01:52

从项目文件中删除"@"字符:
Remove the ''@'' characters from your project file:
CONFIG += c++11


使用GCC时,请检查编译输出窗口是否将C ++ 11选项传递给了编译器(-std = c ++ 11).使用Visual C ++时(根据错误代码可能是这种情况),它必须是VS 2012或更高版本,因为旧版本不支持final.


When using GCC, check the compilation output window if the C++11 option is passed to the compiler (-std=c++11). When using Visual C++ (which seems to be case according the error code), it must be VS 2012 or later because older versions did not support final.