Mac OS X Install GCC Compiler

Posted October 3, 2004 by macster in Mac system administration

Compiling open source projects typically requires a C compiler and GCC is typically the compiler of choice. Mac OS X does not install the GCC compiler by default, but it is freely available in the xcode suite of development tools.


To install the GCC compiler, download the xcode package from http://connect.apple.com/. You will need to register for an Apple Developer Connection account. Once you have registered, login and click Download Software and then Developer Tools. Find the Download link next to Xcode Tools (version) – CD Image, and click it.

Find the downloaded package, double click it, and follow the installation instructions to install GCC and a host of other development applications. The GCC compiler will be located at /usr/bin/gcc.

Websites tend to change over time, so if you notice that the steps to download xcode have changed, please post a comment. I will update the tech-recipe. For example, Steve posted (and Jim Daniel confirmed) that you can download the GCC for 10.6 and 10.7 directly from kennethreitz on github. See comments for the latest link.

The Conversation

Follow the reactions below and share your own thoughts.