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<char[]>(new char[len]);
The Eclipse editor complains about:
Function 'unique_ptr' could not be resolved
The Makefile compilation works fine. How to make Eclipse stop complaining about these sort of errors?
I found this article in the Eclipse forum, just followed those steps and it works for me. I am using Eclipse Indigo 20110615-0604 on Windows with a Cygwin setup.
-std=c++0x
(or for newer compiler version -std=c++11
at the end . ... instead of GCC C++ Compiler I have also Cygwin compiler__GXX_EXPERIMENTAL_CXX0X__
(ensure to append and prepend two underscores) into "Name" and leave "Value" blank.There is a description of this in the Eclipse FAQ now as well: Eclipse FAQ/C++11 Features.