C++ “启动失败。未找到二进制文件。” CDT Kepler Eclipse 上的错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22431979/
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-08-28 00:04:41  来源:igfitidea点击:

"Launch failed. Binary not found." error on CDT Kepler Eclipse

c++eclipseeclipse-cdtmingw32

提问by Manuel

Running or debugging anything gives me an extremely frustrating "Launch failed. Binary not found" error. I'm using Eclipse with a CDT plugin installed (specifically, I have the MinGW package installed).

运行或调试任何东西都会给我一个非常令人沮丧的“启动失败。找不到二进制文件”错误。我正在使用安装了 CDT 插件的 Eclipse(特别是,我安装了 MinGW 包)。

I already tried setting both the user and system PATH variables to include my (MinGW directory)/bin

我已经尝试将用户和系统 PATH 变量设置为包含我的(MinGW 目录)/bin

I also tried building the program before running it.

我还尝试在运行该程序之前构建该程序。

I also made sure that PE Windows Parser under the project's settings was enabled.

我还确保启用了项目设置下的 PE Windows Parser。

I went to Project Properties > Run/Debug Settings > New > C/C++ Application > Environment > Select > and I selected the Path

我去了项目属性 > 运行/调试设置 > 新建 > C/C++ 应用程序 > 环境 > 选择 > 我选择了路径

I also tried setting the C/C++ Application in the Main tab to the executable file that is made from building the program, but no such file is made when I do build my program. I seriously doubt that this is what's causing the problem, though.

我还尝试将 Main 选项卡中的 C/C++ Application 设置为通过构建程序生成的可执行文件,但是当我构建我的程序时没有创建这样的文件。不过,我严重怀疑这是导致问题的原因。

I'm running out of options, and the problem still persists. What else needs to be done? What am I doing wrong?

我的选择不多了,问题仍然存在。还需要做什么?我究竟做错了什么?

When I was looking through the install instructions for MinGW, the tutorial referenced the mingw base package as the package to install after installing MinGW. But mingw base was not available to me. Instead, I saw mingw32 base. Could it be that Eclipse, a 64 bit program, is trying to run 32 bit code? Is that what's going on? If that's the problem, how do I fix it?

当我查看 MinGW 的安装说明时,教程引用了 mingw 基础包作为安装 MinGW 后要安装的包。但是 mingw base 对我来说不可用。相反,我看到了 mingw32 base。会不会是 64 位程序 Eclipse 试图运行 32 位代码?这是怎么回事?如果这是问题,我该如何解决?

回答by singingsingh

  1. Build
  2. Refresh the project. A new folder named Binaries will appear now in project explorer.
  3. Now Run :)
  1. 建造
  2. 刷新项目。一个名为 Binaries 的新文件夹现在将出现在项目资源管理器中。
  3. 现在运行:)

回答by Brian

It took me 3 days to figure out my problem. My Hello World C program would compile in eclipse using the Windows PE Parser, but there was NO EXE FILE!!!! AVAST Antivirus was identifying the exe file as a false positive and removing it....grrrrr. The solution was to add the eclipse workspace folder to the exclusions list. Voila!! Eclipse generated my test.exe file.

我花了 3 天时间才弄清楚我的问题。我的 Hello World C 程序将使用 Windows PE 解析器在 Eclipse 中编译,但没有 EXE 文件!!!!AVAST Antivirus 将 exe 文件识别为误报并将其删除....grrrrr。解决方案是将 eclipse 工作区文件夹添加到排除列表中。瞧!!Eclipse 生成了我的 test.exe 文件。

回答by user3698066

save the file first before you build and run... it works with me

在构建和运行之前先保存文件......它对我有用

回答by kaushalpranav

Check the compiler you set while you created the project . If that is MINGW or Visual Studio ; check whether they are downloaded or not . If not do so and start a new project by closing the old one . Build the new project by pressing Ctrl + B and a new file 'Binaries' is created in the package explorer . Now you can use the run option to run the project .

检查您在创建项目时设置的编译器。如果是 MINGW 或 Visual Studio ;检查它们是否已下载。如果没有,请关闭旧项目并开始一个新项目。按 Ctrl + B 构建新项目,并在包资源管理器中创建一个新文件“二进制文件”。现在您可以使用运行选项来运行项目。

回答by TS1

First the solution: install "make"

首先解决方案:安装“make”

I had the same issue.

我遇到过同样的问题。

I also tried the steps you did with no luck.

我也尝试了你没有运气做的步骤。

After some time i found a the solution!

一段时间后,我找到了解决方案!

The problem was that i did not have the application "make".

问题是我没有应用程序“make”。

Apparently its not installed by default on Cygwin and eclipse doesn't give any indication for that...

显然它没有默认安装在 Cygwin 上,而 eclipse 没有给出任何指示......