How to enable C++11/C++0x support in Eclipse CDT?

后端 未结 17 1516
说谎
说谎 2020-11-22 00:13

Eclipse 3.7.1 CDT 1.4.1 GCC 4.6.2

This is an example of a piece of C++11 code:

auto text = std::unique_ptr(new char[len]);
17条回答
  •  一向
    一向 (楼主)
    2020-11-22 00:47

    For me on Eclipse Neon I followed Trismegistos answer here above , YET I also added an additional step:

    • Go to project --> Properties --> C++ General --> Preprocessor Include paths,Macros etc. --> Providers --> CDT Cross GCC Built-in Compiler Settings, append the flag "-std=c++11"

    Hit apply and OK.

    Cheers,

    Guy.

提交回复
热议问题