Using command line arguments when compiling with gcc in code blocks

So my question is simple.

I want to compile a C project file in the gcc 4.4.8 compiler.

In the cmd window, I can type:

gcc -std=c99 -O2 -DCONTEST -s -static -lm name.c -o name.exe

      

In Code :: Blocks, how do I change the compiler defaults from the above? I wanted to create a c file and I am getting errors like

error: 'for' loop initial declarations are only allowed in C99 mode|

      

+3


source to share


1 answer


It's good to place your preferred arguments in the gnu compiler:

Settings -> Debugger -> Compiler Options -> Other Options

and insert your arguments there!



Example:

-std=c99 -O2 -DCONTEST -s -static -lm

      

+1


source







All Articles