Search code examples
configurationeclipse-cdt

Change the C++ Build command line options with Eclipse


Eclipse 3.8 File>Properties displays a window: Properties for hw.cpp. C/C++ Build>Settings shows: Settings with the tab: Tool Settings containing these text field values:

Command:

g++

All options:

-O0 -g3 -Wall -c -fmessage-length=0

I would like to add -std=c++1y but the All options field is not editable. How do I change the command line options?

The Command field is editable.


Solution

  • File>Properties displays a window: Properties for hw.cpp.

    C/C++ Build>Settings shows: Settings with: GCC C++ Compiler/Micellaneous containing this text field:

    Other flags

    -c -fmessage-length=0 
    

    Change to:

    -c -fmessage-length=0 -std=c++1y
    

    The change will show in the uneditable field, All Options.