I am trying to follow this guide Compiling Ruby, RubyGems, and Rails on Snow Leopard and I am running into a configuration issue.
After downloading and extracting the source, I am running a command to set up some configuration.
This is the output that I am given:
my-macbook-pro:ruby-1.9.1-p243 lillq$ ./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1 checking build system type... i386-apple-darwin10.0.0 checking host system type... i386-apple-darwin10.0.0 checking target system type... i386-apple-darwin10.0.0 checking for gcc... gcc checking for C compiler default output file name... configure: error: in `/Users/lillq/src/ruby-1.9.1-p243': configure: error: C compiler cannot create executables See `config.log' for more details.
Note: The first time I ran this it could not find gcc. To fix this I added to my path /Xcode3.1.4/usr/bin and sbin.
Then I decide to check whether I could compile code. (Its a new computer, I havent compiled on it before and I recently installed Xcode)
my-macbook-pro:~ lillq$ gcc test.c test.c:1:19: error: stdio.h: No such file or directory test.c: In function ‘main’: test.c:5: warning: incompatible implicit declaration of built-in function ‘printf’
I thought that Xcode is suppose to install the compilers correctly for me. Is there something I am missing/doing wrong?