How does one install GCC on a Mac?
How does one install GCC on a Mac?
iMac, OS X Yosemite (10.10), I updated Xcode & Yosemite.
How does one install GCC on a Mac?
iMac, OS X Yosemite (10.10), I updated Xcode & Yosemite.
If you have the most recent Apple Command Line Tools (macOS 10.nn) for Xcode installed for your operating system version — which you get from developer.apple.com/download/more, then you need a package manager (e.g. homebrew) to install, and compile GCC and all of its dependencies. That compilation process will take at least an hour. After you initially install homebrew (brew):
# In the bash shell (e.g. .bash_profile), gag Google Analytics in Homebrew.
export HOMEBREW_NO_ANALYTICS=1
brew update
brew upgrade
brew info gcc
brew install gcc
brew cleanup (this removes previous application/dependency revisions saving considerable space)
The gcc application will be installed by default in /usr/local/bin.
Personally, I use Apple's clang/clang++ compilation tools rather than deal with GNU gcc.
If you have the most recent Apple Command Line Tools (macOS 10.nn) for Xcode installed for your operating system version — which you get from developer.apple.com/download/more, then you need a package manager (e.g. homebrew) to install, and compile GCC and all of its dependencies. That compilation process will take at least an hour. After you initially install homebrew (brew):
# In the bash shell (e.g. .bash_profile), gag Google Analytics in Homebrew.
export HOMEBREW_NO_ANALYTICS=1
brew update
brew upgrade
brew info gcc
brew install gcc
brew cleanup (this removes previous application/dependency revisions saving considerable space)
The gcc application will be installed by default in /usr/local/bin.
Personally, I use Apple's clang/clang++ compilation tools rather than deal with GNU gcc.
Do you need GCC or just a C compiler environment
<http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x>
These instructions will give you a C compiler environment.
However, if you explicitly need GCC, then after installing the command line tools via the above link, you can follow VikingOSX's suggestions.
How does one install GCC on a Mac?