Update GCC on OSX

前端 未结 9 965
醉话见心
醉话见心 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 20:08

    in /usr/bin type

    sudo ln -s -f g++-4.2 g++

    sudo ln -s -f gcc-4.2 gcc

    That should do it.

    0 讨论(0)
  • 2020-11-28 20:09

    If you install macports you can install gcc select, and then choose your gcc version.

    /opt/local/bin/port install gcc_select
    

    To see your versions use

    port select --list gcc
    

    To select a version use

    sudo port select --set gcc gcc40
    
    0 讨论(0)
  • 2020-11-28 20:09

    Whatever Apple ships as the default gcc in xcode (4.2.1 on 10.6, 4.0.1 before) is well tested (and maintained) by the apple guys and the "standard" to build software with on OS X. Everything else is not, so think twice if you want to develop software, or be gcc/OS X beta tester.

    0 讨论(0)
提交回复
热议问题