Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting Default NetBeans Options (-std=c99, -Wall) for C programs

I have NetBeans 6.9 installed and working fine on Ubuntu Linux 11.10. My goal is to set compiler options like -Wall and -std=c99 to be used by default. Currently, I have to right click on my project -> Properties -> C Compiler -> Warning Level to "More Warnings" and add -std=c99 to Additional Options. This is obviously a pain when creating many projects, and I'm sure there is a way to make all of this the default.

I found this thread which relates closely to my question. However, the only answer involves installing Code::Blocks and MSYS 1.0.11, which doesn't make much sense to me. I don't see how installing another IDE will help me, and MSYS seems unnecessary, as I am already using Linux.

I have tried every reasonable search term I can imagine, and am very surprised how little info I have turned up. It seems like most everyone who uses NetBeans should have to change this type of thing at some point. Terms I'm searching for: 'NetBeans -std=c99 default', 'NetBeans set default compile options', 'how to make NetBeans use c99 by default' and 'Code::Blocks settings into NetBeans'.

Please, someone point me in the right direction, or tell me what I should be searching for. I imagine that others have this same question, so I hope this thread is helpful.

like image 755
dfarrell07 Avatar asked Oct 24 '11 23:10

dfarrell07


People also ask

Is NetBeans good for C?

NetBeans is still the best C/C++ cross platform development environment and the only one that gets close to doing remote development correctly.


1 Answers

Here are some different things that you can do:

  1. Copy and share the configuration files between projects, so you won't have to set every setting.
  2. Create a default project, and configure however you like it. When you want to create a new project, just copy the default project and rename it to something else.
  3. Modify your toolchain properties.

For details, see here:

NetBeans settings for GCC

like image 160
XP1 Avatar answered Oct 27 '22 03:10

XP1