"发射失败。二进制未找到&QUOT。雪豹和Eclipse C / C ++ IDE问题 [英] "Launch Failed. Binary Not Found." Snow Leopard and Eclipse C/C++ IDE issue

查看:619
本文介绍了"发射失败。二进制未找到&QUOT。雪豹和Eclipse C / C ++ IDE问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不是一个问题,我刚才搜罗网络中寻找一个解决这个问题的,我想我会用这么好的人分享。我会把它放在普通的条款,使其对newbs访问。 :)(道歉,如果这是放错了地方 - 只是想对大家有所帮助)

Not a question, I've just scoured the internet in search of a solution for this problem and thought I'd share it with the good folks of SO. I'll put it in plain terms so that it's accessible to newbs. :) (Apologies if this is the wrong place -- just trying to be helpful.)

与谁试图使用Eclipse C / C ++ IDE几乎所有用户的OS X雪豹出现此问题,但对于谁是在Leopard中使用Eclipse C / C ++ IDE的人(比如我)特别烦,并且是无法当他们升级了与Eclipse的工作。出现该问题是当用户去构建/编译/链接他们的软件。他们得到了以下错误:

This issue occurs with almost any user OS X Snow Leopard who tries to use the Eclipse C/C++ IDE, but is particularly annoying for the people (like me) who were using the Eclipse C/C++ IDE in Leopard, and were unable to work with Eclipse anymore when they upgraded. The issue occurs When users go to build/compile/link their software. They get the following error:

启动失败。二进制未找到。

Launch Failed. Binary Not Found.

此外,在左边的项目窗口中的二进制分支简直是不存在的。

Further, the "binaries" branch in the project window on the left is simply nonexistent.

问题是:是,GCC 4.2(GNU编译器集)随雪豹编译的二进制文件默认情况下64位。不幸的是,Eclipse使用不理解64位二进制文​​件的链接;它读取32位二进制文​​件。可能还有其他的问题在这里,但总之,他们不产生二进制感达到高潮,至少不是一个Eclipse可以读取,转换到Eclipse中没有找到二进制文件。因此,错误。

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.

一个解决方案是使文件的时候,但手动使文件每次都是烦人添加一个-arch i686的标志。幸运的是,雪豹还附带了GCC 4.0,默认编译在32位。所以,一个解决方案仅仅是作为默认的编译器链接这一点。这是我做的方式。

One solution is to add an -arch i686 flag when making the file, but manually making the file every time is annoying. Luckily for us, Snow Leopard also comes with GCC 4.0, which compiles in 32 bits by default. So one solution is merely to link this as the default compiler. This is the way I did it.

解决办法:GCCS是在/ usr / bin中,这通常是一个隐藏文件夹,所以你不能看到它在Finder中,除非你明确地告诉你想看到隐藏的文件夹系统。无论如何,你想做的事就是去在/ usr / bin文件夹,并删除与GCC 4.2连接海湾合作委员会命令的路径,并添加链接与GCC 4.0 GCC的命令的路径。换句话说,当你或者Eclipse尝试访问海湾合作委员会,我们希望命令去,默认情况下建立32位,这样,链接器可以读取文件的编译器;我们不希望它去,在64位编译编译器。

THE SOLUTION: The GCCs are in /usr/bin, which is normally a hidden folder, so you can't see it in the Finder unless you explicitly tell the system that you want to see hidden folders. Anyway, what you want to do is go to the /usr/bin folder and delete the path that links the GCC command with GCC 4.2 and add a path that links the GCC command with GCC 4.0. In other words, when you or Eclipse try to access GCC, we want the command to go to the compiler that builds in 32 bits by default, so that the linker can read the files; we do not want it to go to the compiler that compiles in 64 bits.

要做到这一点,最好的办法是去应用/工具,并选择称为终端的应用程序。文本提示应该拿出。应该这样说:(计算机名称):〜(用户名)$(与最终为你的用户输入一个空格)。完成上述任务的方法是输入以下命令,进入每一个序列一字不差,而且每个行之后pressing进入。

The best way to do this is to go to Applications/Utilities, and select the app called Terminal. A text prompt should come up. It should say something like "(Computer Name):~ (Username)$ " (with a space for you user input at the end). The way to accomplish the tasks above is to enter the following commands, entering each one in sequence VERBATIM, and pressing enter after each individual line.

cd /usr/bin
rm cc gcc c++ g++
ln -s gcc-4.0 cc
ln -s gcc-4.0 gcc
ln -s c++-4.0 c++
ln -s g++-4.0 g++

我一样,你可能会得到告诉你没有权限访问这些文件的错误。如果是这样,请尝试以下命令来代替:

Like me, you will probably get an error that tells you you don't have permission to access these files. If so, try the following commands instead:

cd /usr/bin
sudo rm cc gcc c++ g++
sudo ln -s gcc-4.0 cc
sudo ln -s gcc-4.0 gcc
sudo ln -s c++-4.0 c++
sudo ln -s g++-4.0 g++

须藤可能会提示您输入密码。如果你以前从未使用sudo的,尽量只pressing进入。如果还是不行,请尝试密码,你的主要管理员帐户。

Sudo may prompt you for a password. If you've never used sudo before, try just pressing enter. If that doesn't work, try the password for your main admin account.

其他可能的解决
您可以进入建设变量到Eclipse中。我想这一点,但我不知道有足够的了解它。如果你想感受它,你可能需要的标志-arch i686的。在认真,GCC-4.0工作对我来说这一切的时候,我看不出有任何理由现在进行切换。有可能是改变编译器本身默认的一种方式,但再一次,我不知道这一点就够了。

OTHER POSSIBLE SOLUTIONS You may be able to enter build variables into Eclipse. I tried this, but I don't know enough about it. If you want to feel it out, the flag you will probably need is -arch i686. In earnest, GCC-4.0 worked for me all this time, and I don't see any reason to switch now. There may be a way to alter the default for the compiler itself, but once again, I don't know enough about it.

希望这会有所帮助和信息。良好的编码!

Hope this has been helpful and informative. Good coding!

推荐答案

只是为了记录,挣扎了30分钟后,我通过在选择的Mach-O 64解析器和精灵分析器解决的狮子这个问题(MAC 10.7):项目。菜单 - >属性 - > C / C ++建设 - >设置 - >二进制解析器选项卡(第一个选项卡,或者在Eclipse版本第三个选项卡:3.7.2),同时通过关史蒂芬妮笑听甜逃生]

just for records, after struggling for 30 minutes, i solved this problem on lion (mac 10.7) by selecting Mach-O 64 Parser and Elf Parser under : Project Menu -> Properties->C/c++ Build->Settings->Binary Parsers tab (first tab, or third tab on Eclipse Version: 3.7.2) [ while listening to sweet escape by gwen stefani lol ].

这篇关于"发射失败。二进制未找到&QUOT。雪豹和Eclipse C / C ++ IDE问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆