0

I'm having trouble with Eclipse CDT. When trying to write a program with C++11 code in it, I'm getting error messages that the C++11 functions "cannot be resolved", despite the program compiling and running perfectly fine. I've searched for solutions (e.g. here or here), but none of them is working for me.

This is a small example: enter image description here

I have gcc / g++ 4.7.3 installed and set the std=c++11 flag in the project settings (C/C++ Build --> Settings --> Tool Settings --> GCC C++ Compiler --> Miscellaneous)

Also, if I insert the __cplusplusmacro somewhere, it's giving me the correct value 201103.

Any idea why this happens only for C++11 specific features?

Community
  • 1
  • 1
Schnigges
  • 1,284
  • 2
  • 24
  • 48
  • 1
    did u do `std=c++11` or `-std=c++11`? also are your lib paths defined properly? – deW1 Jan 03 '14 at 01:02
  • -std=c++11 of course, sorry. What do you mean by defining the lib paths? – Schnigges Jan 03 '14 at 01:24
  • 1
    [Eclipse Doc](http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_proj_paths.htm) Basically that u need to specify where your C++ libarys are – deW1 Jan 03 '14 at 01:27
  • I do have the C++ include libraries specified (like `/usr/include/c++/4.7`, etc.), otherwise the project wouldn't compile and run i guess. Anyway, there are no libraries specified. Are they necessary for this simple project? Where can I find the C++11 specific libraries? – Schnigges Jan 03 '14 at 11:01

0 Answers0