开发者

GCC 4.5: "checking whether the C compiler works... no" error when CFLAGS="-arch x86_64"

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" fr开发者_如何学编程om CFLAGS. Is there a solution to this? Or have I set the flags incorrectly?

Thanks!


-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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜