Why do I get a “C compiler cannot create executable files” (successfully written C code before and compiles this)?

This is the error I get when I type. / 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 the obvious above, I'm trying to compile the Ruby source code. I did some research, but it didn’t look like someone was trying to compile the Lion code itself. I am currently running 10.7.3 OS X Lion, Macbook Pro.

+3
source share
1 answer

If you have Xcode 4.3+, have you installed command line tools? You can download them from the Xcode preferences area or from here .

+1
source

All Articles