Possible Duplicate:
Eclipse CDT C++11/C++0x support
I tried everything to compile C++11 code namely std::unique_ptr and it never compiles.
I followed this and this yet it still doesn’t compile. I also installed gcc 4.7, and made sure that it’s added to the includes directories of my eclipse c++ project, yet it still doesn’t work!!
Is there anything missing please?
Which language standard GCC defaults to depends on how it has been compiled, but most distributions still set this to something like
gnu++98for C++. To use C++11, you have to pass one of the following language standard options:To use a unique pointer: