Saturday, March 16, 2013

OSX 10.8 gcc, compiling, xcode, etc...

After upgrading to OSX 10.8 (fresh install) gcc, clang, etc no longer existed

jemurray@dsg:~ $ gcc
-bash: gcc: command not found

In order to get all your open source compilers back you need to:


  1. Download the latest version of Xcode.   You can do that from the Apple App Store.
  2. Once Xcode is downloaded and installed, you need to install the Xcode Command Line Tools.
    1. Start Xcode
    2. Go to Xcode -> Preferences -> Downloads
    3. Click Install on Command Line Tools (see screen shot below)



That is it:

jemurray@dsg:~ $ which gcc
/usr/bin/gcc
jemurray@dsg:~ $ which clang
/usr/bin/clang
jemurray@dsg:~ $ ls -ald /usr/include
drwxr-xr-x  281 root  wheel  9554 Mar 15 13:53 /usr/include


No comments:

Post a Comment

Followers