Default flags for gcc compiler in Eclipse

前端 未结 5 412
孤城傲影
孤城傲影 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:39

    Assuming you are using Eclipse's internal builder goto Preferences->C/C++ Build->Settings

    Choose the warnings section for the compiler, there are tick boxes for -Wall and -pedantic For -ansi set in Miscellaneous

    As the OP notes this is just for each project not a global setting

提交回复
热议问题