netbeans:c项目如何传递参数进行配置?

发布于 2024-12-14 01:59:05 字数 485 浏览 3 评论 0原文

我想做一些接近的事情 如何将运行参数添加到 Netbeans 中的 C++ 项目< /a>

但我不想将命令参数传递给正在运行的 exe,我想将参数传递给配置脚本

在命令行中编译整个内容时,我使用以下选项配置我的项目(Gimp)

configure --prefix=/opt/gimp-2.7 --without-libtiff --disable-python --without-dbus --disable-gtk-doc

我可以调整吗netbeans 为我使用正确的选项进行配置? 或者 netbeans 只能在根目录进行 make 递归? (所以我需要之前至少运行一次configure {my options})

I want to do something close to
How to add run parameters to a C++ project in Netbeans

but I don't want to pass command args to the running exe, I want to pass args to the configure script

When compiling the whole thing in command line I configure my project (Gimp) with the following options

configure --prefix=/opt/gimp-2.7 --without-libtiff --disable-python --without-dbus --disable-gtk-doc

Could I tweak netbeans to do the configure with proper options for me ?
Or is netbeans only able to do a make recursive at the root directory ? (So I need to run configure {my options} at least once before)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

も让我眼熟你 2024-12-21 01:59:05

当您使用现有源创建新的 C/C++ 项目时,NetBeans 允许您将参数传递给配置脚本。如果项目已创建,您还可以编辑参数并重新运行配置脚本。

创建新项目时传递参数到配置脚本的步骤:

  1. 文件 -> 新建项目
  2. 选择C/C++ Project with Existing Sources
  3. 单击Next
  4. 在选择模式页面上,选择包含现有源和配置脚本的文件夹。
  5. 选择配置模式:下,选择自定义
  6. 单击下一步
  7. 构建工具页面上,选择使用“配置”脚本生成的 makefile
  8. 配置参数中输入配置脚本的参数> 盒子。
  9. 单击向导的其余部分以创建项目
  10. NetBeans 将使用自定义参数运行配置脚本,并在向导完成时生成 Makefile。

要在创建项目后编辑传递给 configure 的参数,请执行以下操作:

  1. 在 NetBeans 项目树中,展开项目,展开重要文件,右键单击 configure 脚本,然后选择选择属性
  2. 单击参数行上的...按钮并编辑参数。
  3. 单击关闭
  4. 右键单击​​配置脚本并选择运行
  5. NetBeans 将使用新参数重新运行配置脚本并重新生成 Makefile。

NetBeans lets you pass arguments to configure script when you create a new C/C++ Project with Existing Sources. You can also edit the arguments and re-run the configure script if the project has already been created.

Steps to pass arguments to configure script when creating a new project:

  1. File ->New Project
  2. Select C/C++ Project with Existing Sources
  3. Click Next
  4. On the Select Mode Page, choose the folder containing the existing source and configure script.
  5. Under Select Configuration Mode:, choose Custom.
  6. Click Next
  7. On the Build Tool page, choose Using the makefile generated by the 'configure' script
  8. Enter your arguments for the configure script in the Configure Arguments box.
  9. Click through the rest of the Wizard to create the project
  10. NetBeans will run the configure script with the custom parameters and generate the Makefile when the wizard completes.

To edit the parameters passed to configure after the project has been created:

  1. In the NetBeans Projects tree, expand your project, expand Important Files, right click on the configure script, and select Properties
  2. Click the ... button on the Arguments line and edit the arguments.
  3. Click Close
  4. Right click on the configure script and select run.
  5. NetBeans will re-run the configure script with the new arguments and regenerate the Makefile.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文