从 Windows 上的 NetBeans 中的 C 项目创建 EXE 输出?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8461225/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 18:37:50  来源:igfitidea点击:

Create EXE output from a C project in NetBeans on Windows?

cwindowsnetbeansbuildexe

提问by Shimmy Weitzhandler

I'm new to NetBeans.
I am using NB on my PC.
I just cleaned & built a project and the output was:

我是 NetBeans 的新手。
我在我的电脑上使用 NB。
我刚刚清理并构建了一个项目,输出是:

CLEAN SUCCESSFUL (total time: 1s)
make: Nothing to be done for `all'.

BUILD SUCCESSFUL (total time: 1s)

Now I can't seem to find any executable.
How do I set the IDE to create an EXE file output from the project?

现在我似乎找不到任何可执行文件。
如何设置 IDE 以从项目创建 EXE 文件输出?

Update- Please read my comment bellow.

更新- 请阅读下面我的评论。

采纳答案by Shimmy Weitzhandler

I re-read the instructions of that project (FFmpeg), and I had to configureit first using ./configurein msysshell.

我重新阅读了该项目 (FFmpeg) 的说明,我必须configure首先./configuremsysshell 中使用它。

As per building ffmpeg with amv-codec-tools, that's simple:

根据使用 amv-codec-tools 构建 ffmpeg,这很简单:

  1. Install MinGW + MSYS and add environment vars for their bin folders
  2. Checkout the latest revision of amv-codec-tools to the msys\homefolder
  3. Remove the folder amv-codec-tools\AMVMuxer\ffmpeg
  4. Checkout the latest revision of FFmpeg to amv-codec-tools\AMVMuxer\ffmpeginstead the previous ver.
  5. Open the MSYS shell
  6. Navigate to amv-codec-tools\AMVMuxer (cd /home/amv-codec-tools/amvmuxer)
  7. Run make build
  1. 安装 MinGW + MSYS 并为其 bin 文件夹添加环境变量
  2. 将最新版本的 amv-codec-tools 签出到msys\home文件夹
  3. 删除文件夹 amv-codec-tools\AMVMuxer\ffmpeg
  4. 签出 FFmpeg 的最新版本,amv-codec-tools\AMVMuxer\ffmpeg而不是以前的版本。
  5. 打开 MSYS 外壳
  6. 导航到 amv-codec-tools\AMVMuxer ( cd /home/amv-codec-tools/amvmuxer)
  7. make build

HTH

HTH

回答by Fabián Heredia Montiel

Press F6 or Shift F6 for project main file.

对于项目主文件,按 F6 或 Shift F6。

Also if you are coding Java(NetBeans) then you must create a main method in the class.

此外,如果您正在编写 Java(NetBeans),那么您必须在类中创建一个 main 方法。

EDIT: The file is available under $Projects -> $Projectname -> Debug || Release -> debug.exe || *.exe

编辑:该文件在 $Projects -> $Projectname -> Debug || 下可用 发布 -> debug.exe || *。可执行程序

回答by clyfe

After you build, the executable should be in a path like PROJECT/dist/PLATFORM/project.exe (dist or build can't remember exactly)

构建后,可执行文件应位于类似 PROJECT/dist/PLATFORM/project.exe 的路径中(dist 或 build 记不清了)