为 C 程序设置默认 NetBeans 选项(-std=c99、-Wall) [英] Setting Default NetBeans Options (-std=c99, -Wall) for C programs

查看:21
本文介绍了为 C 程序设置默认 NetBeans 选项(-std=c99、-Wall)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了 NetBeans 6.9 并且在 Ubuntu Linux 11.10 上运行良好.我的目标是设置 编译器选项,例如 -Wall-std=c99 以默认使用.目前,我必须右键单击我的项目 -> 属性 -> C 编译器 -> 警告级别到更多警告"并将 -std=c99 添加到 附加选项.在创建许多项目时,这显然很痛苦,我相信有一种方法可以将所有这些设置为默认设置.

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.

我发现了与我的问题密切相关的这个主题.但是,唯一的答案涉及安装 Code::Blocks 和 MSYS 1.0.11,这对我来说没有多大意义.我不知道安装另一个 IDE 对我有什么帮助,而且 MSYS 似乎没有必要,因为我已经在使用 Linux.

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.

我尝试了我能想到的所有合理的搜索词,但很惊讶我发现的信息很少.似乎大多数使用 NetBeans 的人都应该在某个时候改变这种类型的东西.我要搜索的术语:'NetBeans -std=c99 default''NetBeans 设置默认编译选项''如何让 NetBeans 默认使用 c99''Code::Blocks 设置到 NetBeans'.

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.

推荐答案

您可以执行以下操作:

  1. 在项目之间复制和共享配置文件,这样您就不必设置每个设置.
  2. 创建一个默认项目,然后根据自己的喜好进行配置.当您要创建新项目时,只需复制默认项目并将其重命名为其他名称即可.
  3. 修改您的工具链属性.

有关详细信息,请参见此处:

For details, see here:

GCC 的 NetBeans 设置

这篇关于为 C 程序设置默认 NetBeans 选项(-std=c99、-Wall)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆