Thursday, January 10, 2013

[Eclipse] c++11 support

When i'm trying to use some new features in c++11, for instance, unordered_map class, Eclipse CDT cannot resolve it successfully.

To solve the above problem,  two steps need to be done:

1) Right click on your project->Properties->C/C++ Build->Settings->GCC c++ compiler->misc->Other Flags
Please add "-std=c++0x"

2) After step 1, it may work just fine. But just in case there's still issue on resolving "unordered_map", 
choose:  C/C++ general->Paths and Symbols->symbols
add "__GXX_EXPERIMENTAL_CXX0X__".


No comments:

Post a Comment