您的位置:首页 > 编程语言 > C语言/C++

Eclipse支持 C++ 11

2016-05-19 15:35 375 查看
设置Eclipse使用C++0x标准

具体步骤

1. 右键项目 -> properties -> C/C++ Build -> Settings -> GCC C++ Compiler -> Miscellaneous

添加 ”-std=c++0x" ,不要引号 ,然后各种apply 和OK



2. 右键项目 -> properties -> C/C++ General -> Preprocessor Include Paths,Macros, etc. -> Providers

勾选

CDT GCC Built in Compiler Settings MinGW ,因为我用的是MinGW

取消 下面的Use gloabal provider shared between projects

同样在下面的Command to get Compiler spes 的值的后面加上“std=c++0x” 不要引号

然后apply and OK



3. 返回项目workspace ,选择Project菜单 -> C/C++ index -> Re-resolve unresolved includes

现在你的Eclipse支持c++11标准了,当然错误也没了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: