Eclipse - Tips'n Tricks - Adding flags to the GCC compiler

You may want to add some commands to your GCC flag settings.

No problem, Eclipse can allow you this.

Right click on your project > Properties > C/C++ Build > Settings > Tool Settings > GCC C++ Compiler > Miscellaneous.
On the right, there is an input with the name Other flags.
Enter your command there.

For example, if when you compiling you have this error:

  • deprecated conversion from string constant to 'char*' [-Wwrite-strings]

You can add this command to remove it:

  • -Wno-write-strings

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.