Compiling the C + + 11 source with Eclipse Luna is always an error, and the compiler MinGW GCC, which needs to be set in the CDT as follows:
Menu:
Window
-Preferences
-C/C++
-Build
-Settings
-Discovery
-CDT GCC Build-in Compiler Settings
添加
-std=c++11
Right-click Project properties:
Properties
-C/C++ Build
-Settings
-Tool Settings
-GCC C++ Compiler
-Dialect
Add to-std=c++11
Toother dialect flags
or select a listISO C++11
If this is a CMake project:
CMake-G"Eclipse Cdt4-unix makefiles" -D Cmake_build_type=Debug ..
Right-click Project properties:
Properties
-C/C++ General
-Preprocessor Include Paths, Marcos etc.
-Providers
cdt GCC build-in Compiler Settings Priority contributed pathentry Containers
menu inside select project
->c/c++ index
Rebuild index makes C + + 11 code prompt correctly.
From
Http://stackoverflow.com/questions/9131763/eclipse-cdt-c11-c0x-support
Enable Eclipse CDT 4.4 Luna to support settings for C + + 11