Tuesday, December 11, 2012

Installing gcc on Mountain lion

Mountain lion does not include gcc, and the compiler comes with Xcode 4.3 is llvm, not gcc.

Installing HomeBrew
$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"


Installing gcc with c++ support (c and c++ supports are enough for me)
$ brew install --enable-cxx --use-llvm https://raw.github.com/Homebrew/homebrew-dupes/master/gcc.rb


Note: When installing HomeBrew, the installer changes permission for /usr/local/.
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/. /usr/local/bin /usr/local/include /usr/local/lib

Reference:
https://github.com/mxcl/homebrew/wiki/FAQ#wiki-sudo
https://github.com/Homebrew/homebrew-dupes/blob/master/gcc.rb

No comments:

Post a Comment