Guide to Eclipse with C++11 standard [message #787571] |
Tue, 31 January 2012 18:37 |
Robert Pavel Messages: 3 Registered: August 2010 |
Junior Member |
|
|
Figured it would be worth making a thread for people who, like me, are trying to get the Eclipse support for the C++11 (previously known as C++0x) standard. Currently the info is spread out over a few threads, but I didn't find an easy centralized location. As with most computer-related help forums on the internet, people don't come back once they have a solution.
After a bit of research and fiddling, the following steps seem to work (if someone more knowledgeable wants to correct me, feel free).
This is for Eclipse Indigo with CDT 8.0.1.
Standard Project
- Make a new C++ project (currently I have only tested "Empty Project -> Linux GCC". Others can verify on non-Linux platforms)
- Default options for everything
- Once created, right-click the project and go to "Properties"
- C/C++ Build -> Settings -> Tool Settings -> GCC C++ Compiler -> Miscellaneous -> Other Flags. Put "-std=c++0x" at the end
- C/C++ General -> Paths and Symbols -> Symbols -> GNU C++. Click "Add..." and paste "__GXX_EXPERIMENTAL_CXX0X__" into "Name" and leave "Value" blank.
- Hit Apply, do whatever it asks you to do, then hit OK.
Makefile Project
- Make a new empty Makefile project (or import an old one)
- Default options for everything
- Once created, right-click the project and go to "Properties"
- C/C++ General -> Paths and Symbols -> Symbols -> GNU C++. Click "Add..." and paste "__GXX_EXPERIMENTAL_CXX0X__" into "Name" and leave "Value" blank.
- Hit Apply, do whatever it asks you to do, then hit OK.
- Obviously make sure your rule includes "-std=c++0x" as a compiler option.
And everything should be functional (based on limited testing). At the very least,
I got a few examples to compile, which is enough for me to start development. Syntax highlighting works, and so does building.
[Updated on: Tue, 31 January 2012 19:20] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03901 seconds