如何在Eclipse Helios上使用C++0x

How do I use C++0x on Eclipse Helios?

本文关键字:C++0x Helios Eclipse      更新时间:2023-10-16

我正在尝试在Helios Eclipse上使用C++0x。

我按照这里的说明进行操作:

Eclipse CDT C++11/C++0x 支持

他们不会工作。

当我使用 make -f makefile(在调试目录中)时,出现错误:

     g++ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++0x -MMD -MP -MF"cnfo.d" -MT"cnf_io.d" -o"cnfo.o" "../cnfo.cpp"
    cc1plus: error: unrecognized command line option "-std=c++0x"

我正在使用MacOSx。我刚刚重新安装了xcode,最新版本。G++ --version 给出:

     # g++ --version
     i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
     Copyright (C) 2007 Free Software Foundation, Inc.
     This is free software; see the source for copying conditions.  There is NO
     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

除了上面在StackOverflow链接中所说的内容外,我没有更改项目设置中的任何内容。

我认为使用 G++ 4.2.1 不会得到 C++11,因为实现是从 4.3 开始的......
当前版本为4.9.x,请获取更新的软件。