Mac "configure: error: C compiler cannot create executables" CFLAGS 10.6 10.7

  1. Check if you have the Right Version of with gcc:

    ls /usr/local/bin | grep gcc

    If in the Output you have gcc-4.2 you have the Righ Tool.

  2. This Error can Come from the fact you have inserted in CFLAGS, CCFLAGS and CXXFLAGS Parameters some Unsupported Architecture.

    Example you have a Mac Intel and you Asked by CFLAGS+CCFLAGS+CXXFLAGS the generation of PPC Code with:

    CFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64' CCFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64' CXXFLAGS='-arch i386 -arch ppc -arch ppc64 -arch x86_64'

    You Simply need to Remove the PPC Architecture from Settings... This is the Correct Setup:

    CFLAGS='-arch i386 -arch x86_64' CCFLAGS='-arch i386 -arch x86_64' CXXFLAGS='-arch i386 -arch x86_64'

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer