Setting GCC 4.2 as the default compiler on Mac OS X Leopard

前端 未结 6 1695
小蘑菇
小蘑菇 2020-11-29 18:53

I\'m sure there must be a way to do this. As you are probably aware the latest versions of Xcode (and in fact I think all versions of Xcode) on Leopard come with GCC 4.0.1 a

6条回答
  •  抹茶落季
    2020-11-29 19:36

    In the Project or Target Info Window set the build setting "C/C++ compiler version" (GCC_VERSION).

    Or in the Target Info Window you can change the "System C rule" to your favorite GCC version.

    Update: Regarding the command line I would leave to Leopard the decision of what should be the default compiler. If you want to use a different compiler with tools like Autotools configure you had better to define the CC variable.

    CC=gcc-4.2 ./configure
    

    or

    export CC=gcc-4.2
    

提交回复
热议问题