Default flags for gcc compiler in Eclipse

前端 未结 5 420
孤城傲影
孤城傲影 2020-12-21 04:54

I want all my C programs to be compiled with the options -Wall -pedantic -ansi by default. Is there a way to have Eclipse add these flags to the compiler comman

5条回答
  •  别那么骄傲
    2020-12-21 05:37

    Yes, Run as -> Run configuration -> 1st Tab is "Main" , choose the second tab(the one next to it) , you have there arguments box, paste -Wall -pedantic -ansi and just apply then run. Every next time you run you'll have these arguments as default

提交回复
热议问题