Eclipse mac osx:启动失败,找不到二进制文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8007097/
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
Eclipse mac osx: Launch failed, binary not found
提问by im7xs
Just installed eclipse on my mac cannot run my projects when i build and run i get the following message: launch failed, binary not found. I've set on project setting \macosx gcc\ and linker\miscellaneus\flags -arch i686 doesnt work, i am pretty stuck.
刚刚在我的 mac 上安装 eclipse 无法运行我的项目,当我构建和运行时,我收到以下消息:启动失败,找不到二进制文件。我已经设置了项目设置 \macosx gcc\ 和链接器\miscellaneus\flags -arch i686 不起作用,我被卡住了。
回答by Lycan22
Hi I ran into a similar problem. I am using the following build :
嗨,我遇到了类似的问题。我正在使用以下版本:
Eclipse IDE for C/C++ Developers Version: Juno Service Release 2
面向 C/C++ 开发人员的 Eclipse IDE 版本:Juno Service Release 2
The fix go into Project > Properties > C/C++ Build > Settings > Binary Parsers : Make sure "Mach-O 64 Parser is selected"
修复进入 Project > Properties > C/C++ Build > Settings > Binary Parsers :确保选择“Mach-O 64 Parser”
This thread helped me out: "Launch Failed. Binary Not Found." Snow Leopard and Eclipse C/C++ IDE issue"THE PROBLEM: is that GCC 4.2 (the GNU Compiler Collection) that comes with Snow Leopard compiles binaries in 64-bit by default. Unfortunately, the linker that Eclipse uses does not understand 64-bit binaries; it reads 32-bit binaries. There may be other issues here, but in short, they culminate in no binary being generated, at least not one that Eclipse can read, which translates into Eclipse not finding the binaries. Hence the error."
该线程帮助我解决了:“启动失败。找不到二进制文件。” Snow Leopard 和 Eclipse C/C++ IDE 问题“问题:Snow Leopard 附带的 GCC 4.2(GNU 编译器集合)默认编译 64 位二进制文件。不幸的是,Eclipse 使用的链接器不理解 64 位二进制文件;它读取 32 位二进制文件。这里可能还有其他问题,但简而言之,它们最终导致没有生成二进制文件,至少不是 Eclipse 可以读取的二进制文件,这会转化为 Eclipse 找不到二进制文件。因此出现错误。 ”
回答by Coty Embry
The fix go into Project > Properties > C/C++ Build > Settings > Binary >Parsers : Make sure "Mach-O 64 Parser is selected"
修复进入 Project > Properties > C/C++ Build > Settings > Binary >Parsers :确保选择“Mach-O 64 Parser”
I made sure this was correct, and still recieved an error, so I would say the best solution is to do this step...then, BUILD the project, then press the "play" button and it should work (that is what fixed my problem)
我确定这是正确的,但仍然收到错误,所以我会说最好的解决方案是执行此步骤......然后,构建项目,然后按“播放”按钮,它应该可以工作(这是固定的我的问题)
回答by hesham.shabana
You need to select the proper binary parser so Eclipse can recognize the executable :
您需要选择合适的二进制解析器,以便 Eclipse 可以识别可执行文件:
Select the project, then
选择项目,然后
Project->Properties->C/C++ Build->Settings->Binary Parsers
项目->属性->C/C++ Build->设置->二进制解析器
For the mac select Mach-O Parser.
对于 mac,选择 Mach-O 解析器。
I wish CDT just came with these selected, it'd be a simple plug-n-play setup. If nothing else they could add a hint in the error text.
我希望 CDT 刚刚选择了这些,这将是一个简单的即插即用设置。如果不出意外,他们可以在错误文本中添加提示。
回答by BraveAnt
I had the same issue, although i changed the parser as above mentioned it didn't work and i got the same error.
我遇到了同样的问题,虽然我如上所述更改了解析器,但它不起作用,我遇到了同样的错误。
In addition, building the project via the menu solved the problem:
另外,通过菜单构建项目解决了这个问题:
Project>Build All
I guess the very first code execution with eclipse makes it necessary to build the code separately before pressing the green run button (as i supposed this at least compiles the code).
我猜第一次使用 eclipse 执行代码使得有必要在按下绿色运行按钮之前单独构建代码(因为我认为这至少会编译代码)。
回答by Kai
You must build it first, then click run. It will be fine then.
您必须先构建它,然后单击运行。到时候就好了。