0

I've tried everything I can find, including the official Eclipse CDT Wiki and a couple posts here, including this one, and another article I found; none of which proved to be successful.

When I try and build my project I get a "has not been declared" error on all C++11 commands, and the editor still underlines these commands.

My current settings:

  • Properties > C/C++ Build > Settings > Tool Settings > Cygwin C++ Compiler > Miscellaneous > Added -std=c++0x to the end (and I've tried -std=c++11)
  • Properties > C/C++ Build > Settings > Tool Settings > Cygwin C++ Linker > Miscellaneous > Added -std=c++0x to the end (and I've tried -std=c++11)
  • Properties > C/C++ Build > Discovery Options > Cygwin C++ Compiler > Added -std=c++0x to the end of Compiler invocation arguments (and I've tried -std=c++11)
  • Cleared discovered entries

I've also tried adding __GXX_EXPERIMENTAL_CXX0X__ to my Symbols.

I'm using the Cygwin + GCC 4.8.2 compiler and Eclipse Indigo (with the latest CDT updates) if that helps.

Thanks!

Oh, and on a side note, does anyone know if Eclipse CDT is going to eventually support C++11 without having to go through all this trouble?

Community
  • 1
  • 1
cohenadair
  • 2,072
  • 1
  • 22
  • 38
  • Go to your project properties -> C/C++ Build / Settings, select the active configuration and the Tool Settings tab, then the line for your compiler (maybe "MinGW C++ Compiler" or similar). What does it say in "All options"? I suspect your `-fmessage-length=` options is messed up. Mine says `-fmessage-length=0`. – Fred Larson Feb 21 '14 at 04:53
  • I thought that too, but I think everything is okay. My whole line says `-O0 -g3 -Wall -c -fmessage-length=0-std=c++11`. I even tried adding a space after the 0, but that resulted in the same except the C++11 commands failed to compile. – cohenadair Feb 21 '14 at 04:59
  • Well, you definitely have to have a space in there to separate the options. – Fred Larson Feb 21 '14 at 05:10
  • Alright I've added in the space, but now it it'll just throw a "was not declared" error on all C++11 commands. Updated the OP. – cohenadair Feb 21 '14 at 05:16

0 Answers0