Using C++11 with eclipse CDT

Requirements:
A valid tool chain supporting C++11. I tested it with Ubuntu and GCC 4.6.3.

  • Add the -std=c++0x flag to
    Properties — C/C++ Build — Tool Settings — GCC C++ Compiler — Miscellaneous
  • Add the -pthread flag to
    Properties — C/C++ Build — Tool Settings — GCC C++ Linker — Miscellaneous
  • Add __GCC_EXPERIMENTAL_CXX0X__ to
    Properties — C/C++ General — Paths and Symbols — Symbols — GNU C++
    and leave the value blank