简体   繁体   English

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

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

I am trying to make use of C++0x on Helios Eclipse. 我正在尝试在Helios Eclipse上使用C ++ 0x。

I followed the instructions from here: 我按照这里的指示进行:

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

They won't work. 他们不会工作。

When I use make -f makefile (in the Debug directory), I get the error: 当我使用make -f makefile(在Debug目录中)时,出现错误:

     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"

I am using MacOSx. 我正在使用MacOSx。 I re-installed xcode just now, with the latest version. 我刚刚用最新版本重新安装了xcode。 g++ --version gives: 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.

I didn't change anything in my project settings other than what it said above in the StackOverflow link. 除了上面在StackOverflow链接中所说的以外,我没有更改项目设置中的任何内容。

I don´t think you´ll get C++11 with G++ 4.2.1, because the implementation started with 4.3 ... 我认为您不会在G ++ 4.2.1中获得C ++ 11,因为实现始于4.3 ...
the current versions are 4.9.x, get newer software. 当前版本为4.9.x,请获取更新的软件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM