Mac OS X – C compiler cannot create executables

A friend was trying to compile cvsgraph on his Mac (10.4.10 intel) the other day and was receiving the error


  configure: error: C compiler cannot create executables

By chance he also tried installing a Fink package by source that day as well, and received the same error. We checked out the GCC version

gcc -v

and it showed GCC 3.3. Some google time later, and it turns out this is an older GCC for the current XCode SDK he has installed. Somehow the system needed to be told what GCC to use, so this is the command that saved the day

sudo gcc_select 4.0 

Simple fix really.

No Comments

Post a Comment

Your email is never shared. Required fields are marked *