Why am I getting a “C compiler cannot create executables” (successfully written C code prior to this and compiles that)?

丶灬走出姿态 提交于 2019-12-14 04:25:50

问题


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

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.


回答1:


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.



来源:https://stackoverflow.com/questions/9812505/why-am-i-getting-a-c-compiler-cannot-create-executables-successfully-written

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!