Update GCC on OSX

前端 未结 9 1100
醉话见心
醉话见心 2020-11-28 19:08

So I am a new programmer and I just installed XCode on my Macbook to get the GCC. I think Xcode is the only way for getting GCC on OSX. Now when I run my Hello World applica

9条回答
  •  一个人的身影
    2020-11-28 19:54

    I know it is an old request. But it might still be useful to some. With current versions of MacPorts, you can choose the default gcc version using the port command. To list the available versions of gcc, use:

    $ sudo port select --list gcc

    Available versions for gcc:
    gcc42
    llvm-gcc42
    mp-gcc46
    none (active)
    

    To set gcc to the MacPorts version:

    $ sudo port select --set gcc mp-gcc46

提交回复
热议问题