为什么我得到一个“C 编译器无法创建可执行文件"?(在此之前成功编写了 C 代码并编译了它)? [英] Why am I getting a "C compiler cannot create executables" (successfully written C code prior to this and compiles that)?

查看:48
本文介绍了为什么我得到一个“C 编译器无法创建可执行文件"?(在此之前成功编写了 C 代码并编译了它)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在输入 ./configure 时遇到的错误:

This is the error I am getting when typing ./configure :

checking build system type... x86_64-apple-darwin11.3.0
checking host system type... x86_64-apple-darwin11.3.0
checking target system type... x86_64-apple-darwin11.3.0
checking whether the C compiler works... no
configure: error: in `/opt/ruby-1.9.3-p125':
configure: error: C compiler cannot create executables
See `config.log' for more details

如上所示,我正在尝试编译 Ruby 源代码.我做了一些研究,但似乎没有人尝试过自己在 Lion 上编译代码.我目前运行的是 10.7.3 OS X Lion、Macbook Pro.

As is obvious by above, I am trying to compile the Ruby source code. I did some research but doesn't look like anybody has attempted compiling the code themselves on Lion. I am currently running 10.7.3 OS X Lion, Macbook Pro.

推荐答案

如果您有 Xcode 4.3+,是否安装了命令行工具?您可以从 Xcode 的首选项窗格中下载它们,也可以从此处下载.

If you have Xcode 4.3+, did you install the command-line tools? You can download them from within Xcode's preference pane, or from here.

这篇关于为什么我得到一个“C 编译器无法创建可执行文件"?(在此之前成功编写了 C 代码并编译了它)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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