Update GCC on OSX

前端 未结 9 1082
醉话见心
醉话见心 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:57

    You can install your GCC manually

    either through

    sudo port install gcc46
    

    or your download the source code from one of the mirrors from here for example here

    tar xzvf gcc-4.6.0.tar.gz cd gcc-4.6.0 ./configure make

    well if you have multiple version, then through you can choose one

    port select --list gcc
    

    remember port on mac is called macport https://www.macports.org/install.php and add add the bin into your path export PATH=$PATH:/opt/local/bin

提交回复
热议问题