views:

145

answers:

1

I compiled and installed GCC 4.5.1 via MacPorts in my installation of Mac OS X 10.6.4. When trying to ./configure software (such as, but not limited to: Wine 1.3.0, libjpeg, etc.), I set the compiler flag to CFLAGS = "-arch x86_64 -m64" to make sure that the compiled program will be 64-bit enabled. But I got an error during configure saying:

"checking whether the C compiler works... no"

This does not occur if I remove "-arch x86_64" from CFLAGS. Is there a solution to this? Or have I set the flags incorrectly?

Thanks!

+2  A: 

-arch is a flag only in Apple's version of gcc. Since you built from source that didn't come from Apple, your new gcc doesn't have that flag. Check its man page for what flag you should be passing to make it generate 64-bit code.

Carl Norum