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
Advertisements

About Jan Tschada

Software engineer from Germany
This entry was posted in Common. Bookmark the permalink.

One Response to Using C++11 with eclipse CDT

  1. Matt says:

    Could you just go to properties setting in project then activate language standard to ISO C++ (-std=c++0x) under Tool Settings -> GCC C++ Compiler ->Dialect?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s