"发射失败。二进制找不到"错误在OS X 10.9.2下在Eclipse中4.3.0 [英] "Launch failed. Binary not found" error for C in Eclipse 4.3.0 on OS X 10.9.2

查看:200
本文介绍了"发射失败。二进制找不到"错误在OS X 10.9.2下在Eclipse中4.3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于今天一早我一直无法编译任何C程序在Eclipse,当我建一个项目就不会创造必要的二进制文件,实际上它不会在所有创建的二进制文件的文件夹。我曾尝试一切,我已经看到了在这里尝试修复它,它只是变得更糟。这是我到目前为止已经试过,结果:

Since early today I have not been able to compile any C programs in Eclipse as it will not create the necessary binaries when I build a project, in fact it won't create a binaries folder at all. I have tried everything I've seen on here to try to fix it, and it's only gotten worse. Here's what I've tried so far and the results:

从<一个href=\"http://stackoverflow.com/questions/1668447/launch-failed-binary-not-found-snow-leopard-and-eclipse-c-c-ide-issue\">"Launch失败。二进制未找到&QUOT。雪豹和Eclipse C / C ++ IDE问题,在终端:

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++

这是应该的路径,32位GCC 4.0来自64位4.2改变。然而,这样做后,我有一个重大问题:我不再有任何类型的海湾合作​​委员会的事实证明,当我打电话

This was supposed to change the path to 32-bit GCC 4.0 from 64-bit 4.2. After doing this however, I had a major problem: I no longer had any type of GCC as evidenced by the fact that when I called

gcc -v

在终端,它返回:

in Terminal, it returned:

-bash: gcc: command not found

在试图做出正确的事情,我重新下载了从X code中的命令行工具和重新安装它们,和X code承认,他们确实安装。尽管如此,海合会呼吁仍然-v返回-bash:找不到命令:GCC。重复此过程后,我得到了相同的结果,这使得它看起来好像我不能安装/所有找到的C编译器!这也似乎二进制文件previousÇ项目的工作时,一切都这样做后,精美消失了。

In an attempt to make things right, I re-downloaded the Command Line Tools from Xcode and reinstalled them, and Xcode acknowledges that they are indeed installed. Despite this, calling gcc -v still returned -bash: gcc: command not found. After repeating this process, I got the same result, which makes it seem as if I cannot install/find the c compiler at all! It also seems that the binaries for previous C projects that worked when everything was fine disappeared after doing this.

我也试过:


  1. 将项目>属性> C / C ++编译>设置>二进制解析器:并使64分析器选择确定的Mach-O

  1. Going to Project > Properties > C/C++ Build > Settings > Binary Parsers : and making sure Mach-O 64 Parser was selected.

编辑在MacOS X的Ç链接器和GCC C编译器的标志文本框的其他部分持有-arch i686的

Editing in the Miscellaneous sections of MacOS X C Linker and GCC C Compiler the flags textbox to hold "-arch i686"

这一切都不曾...

我现在很茫然,真正卡住。如果有人可以帮助,这将是极大的AP preciated。

I am now at a loss and really stuck. If anyone can help, it would be greatly appreciated.

感谢您!

推荐答案

第一件事的第一:你读/试戴一下Ctrl键单击该链接的问题最upvoted答案,选择生成项目

First thing's first: Have you read/tried the most-upvoted answer on the linked question about Ctrl-click to select "Build Project"?

我真的不能给你讲的问题与Eclipse,因为我不使用它,但我怀疑你可能在这一点上打乱了你的OS X安装。不幸的是,你使用的建议可能是在雪豹的时间内有用,但是它是最有可能没有任何更多。我不知道的究竟的时候发生这种情况,但GCC 4.0不再与OS X或X code装运它肯定了为10.9.2。它不会被任何X code下安装任何更多的,还是由安装命令行工具选项,所以如果你真的需要编译器的具体版本,你将不得不构建和安装你自己。

I can't really speak to your issue with Eclipse, as I don't use it, but I suspect that you've probably mucked up your OS X installation at this point. Unfortunately, the advice you used may have been helpful in the SnowLeopard timeframe, but it's most likely not any more. I'm not sure exactly when this happened, but GCC 4.0 is no longer shipping with OS X or Xcode and it's certainly gone as of 10.9.2. It won't be installed any more by either Xcode, or by the "Install Command Line Tools" option, so if you really need that specific version of the compiler, you're going to have to build and install it yourself.

在默认情况下,在最近的OS X安装在的/ usr / bin中编译器可执行文件是有效的调用存根 xcrun 确定X code'S当前版本的位置。默认情况下的/ usr / bin中/海湾合作委员会与当前安装的X $版本附带的任何版本C $角

By default, on recent OS X installs, the compiler executables in /usr/bin are stubs that effectively call xcrun to determine the location of Xcode's current version. By default /usr/bin/gcc points to whatever version of clang came with your currently-installed version of Xcode.

我不知道如何让这些存根回删除它们之后,但我会做一个全新安装最新版的X code,然后做后再次安装命令行工具开始,看看是否让你回到至少的具有的这些存根到位。

I'm not sure how to get those stubs back after deleting them, but I would start by doing a fresh install of the latest Xcode and then doing Install Command Line Tools again after that, and see if that gets you back to at least having these stubs in place.

除此之外,我会寻找另一种方法,您的问题与Eclipse。铿锵肯定是能够产生32位二进制文​​件。我想不出一个很好的理由,你想使用GCC 4.0在铿锵的。

Beyond that, I would look for another approach to your problem with Eclipse. Clang is certainly capable of generating 32-bit binaries. I can't think of a good reason that you would want to use GCC 4.0 over clang at all.

这篇关于&QUOT;发射失败。二进制找不到&QUOT;错误在OS X 10.9.2下在Eclipse中4.3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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