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

后端 未结 17 1540
说谎
说谎 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:35

    • right-click the project and go to "Properties"
    • C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler -> Miscellaneous -> Other Flags. Put -lm at the end of other flags text box and OK.

提交回复
热议问题