I am using Eclipse to write C/C++ programs. I would like to compile my code using the -Wall and -pedantic flags. How do I enable these flags within Eclipse so they are used by default whenever I compile a C/C++ program?
相关问题
- Eclipse and Mylyn : how to disable grey files in t
- Angular: ngc or tsc?
- Installing Pydev for Eclipse throws error
- Error in Scala Compiler: java.lang.AssertionError:
- Where is the implementation of included C++/C head
相关文章
- selenium+eclipse 打开网页时报错
- Eclipse failing to open
- Eclipse how can I indent C++ preprocessor macros
- Why is FindBugs ignoring my check for null?
- Eclipse cleanup - what are the “.index” files - ca
- Eclipse plugin to find out unused methods in a cla
- Spring NamespaceHandler issue when launching Maven
- Google USB Package isn't showing in SDK Manang
Go to Eclipse -> Project Explorer -> your project -> context menu -> Properties.
A dialog appears. In the left pane, open "C/C++ Build" -> Settings. In the right pane, ensure that tab "Tool Settings" is selected -> Under "GCC C++ Compiler" select "Warnings" -> check the boxes that you want.
In your case, you want "Pedantic (-pedantic)". "All warnings (-Wall)" should already be checked by default. You may want "Extra warnings (-Wextra)" (alias "-W"), too.