使Eclipse CDT 支持 c++ 11 的设置

来源:互联网 发布:oracle查询去重数据 编辑:程序博客网 时间:2024/05/29 01:56
需要在CDT设置如下:

1.菜单:

Window ->  Preferences -> C/C++ ->  Build -> Settings ->  Discovery -> CDT GCC Build-in Compiler Settings

添加-std=c++11

2.右键项目属性:

Properties ->  C/C++ Build -> Settings ->  Tool Settings -> GCC C++ Compiler ->  Dialect

添加 -std=c++11other dialect flags 或者列表里面选择 ISO C++11

3.右键项目属性:

Properties ->  C/C++ General -> Preprocessor Include Paths, Marcos etc. ->  Providers

使 CDT GCC Build-in Compiler Settings 优先  Contributed PathEntry Containers

4.菜单里面选择 Project -> C/C++ Index 重建索引使c++ 11的代码提示正确。

0 0