C++ 启动失败。未找到二进制文件。为什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18792466/
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
Launch failed. Binary not found. Why?
提问by Little Child
I am on Windows 7 32 bit using Eclipse Juno. I have installed the CDT plugin. I have also installed Cygwin
and the necessary files from packages like gdb
, gcc
, gawk
, make
etc.
我在 Windows 7 32 位上使用 Eclipse Juno。我已经安装了 CDT 插件。我还安装Cygwin
并从包所需的文件,如gdb
,gcc
,gawk
,make
等。
I still get a Binary Not Found
error. I had a look at this question
Launch Failed Binary not found Eclipse for C in Windowstried everything but there seems to be no solution for it.
我仍然收到Binary Not Found
错误。我查看了这个问题
Launch Failed Binary not found Eclipse for C in Windows尝试了所有方法,但似乎没有解决方案。
What is going wrong ?
出了什么问题?
回答by Sdembla
There can be multiple reasons for this :
这可能有多种原因:
First : Select Preference (click on Eclipse in MAC machine left top OR Windows from menu in Windows OS to find preferences) --> C/C++ --> New c/c++project wizard--> change to MACOS GCC (for mac) or Cygwin GCC (for windows)
第一:选择 Preference(点击 MAC 机器左上角的 Eclipse 或 Windows 操作系统菜单中的 Windows 以查找首选项)--> C/C++ --> 新建 c/c++ 项目向导--> 更改为 MACOS GCC(对于mac) 或 Cygwin GCC(适用于 Windows)
Second : I had the similar issue but code was different. In File.h file make sure
第二:我有类似的问题,但代码不同。在 File.h 文件中确保
virtual ~Destructor () {}; //Don't forget Curly braces {}
Above statement shows destructor initialized () and defined with curly braces { } . In my code I forgot to define Destructor. Hope this helps
上面的语句显示了析构函数初始化 () 并用花括号 { } 定义。在我的代码中,我忘记定义析构函数。希望这可以帮助
回答by Maaehj
Run eclipse from a cygwin shell :
从 cygwin shell 运行 eclipse :
pathToEclipse/eclipse.exe
pathToEclipse/eclipse.exe
Choose compilator cygwin Gcc when you build a new project.
构建新项目时选择编译器 cygwin Gcc。
Build and Run work now.
立即构建和运行工作。
回答by vishakha
Simply go to the project(main manu)-> Build all This will solve your problem.
只需转到项目(主手册)-> 全部构建这将解决您的问题。
回答by AdityaTS
Go to Window -> Preferences -> C/C++ -> New C/C++ Project Wizard -> Makefile Project.
转到窗口 -> 首选项 -> C/C++ -> 新建 C/C++ 项目向导 -> Makefile 项目。
Choose one the following parsers and try with a new project.
选择以下解析器之一并尝试新项目。
- PE Windows parser
- Cygwin PE parser
- PE Windows 解析器
- Cygwin PE 解析器
回答by Brian
I was also receiving "Launch failed. Binary not found." My problem was AVAST Anti-virus. My Hello World C program would compile in eclipse CDT using the Windows PE Parser and mingw gcc compiler, 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.
我还收到“启动失败。找不到二进制文件。” 我的问题是 AVAST Anti-virus。我的 Hello World C 程序将使用 Windows PE Parser 和 mingw gcc 编译器在 eclipse CDT 中编译,但没有 EXE 文件!!!!AVAST Antivirus 将 exe 文件识别为误报并将其删除....grrrrr。解决方案是将 eclipse 工作区文件夹添加到排除列表中。瞧!!Eclipse 生成了我的 test.exe 文件。