Installing g++ and gcc on Mac OS X 10.8 command line

Here’s what you need to do to install g++ and gcc on Mac OS X 10.8.

  1. Install XCode 4.4 from App Store.
  2. Start XCode.
  3. Run XCode > Preferences > Downloads > Components > Command Line Tools > Install.

Once done you should be able to run g++ and gcc from the command line as follows.

tron:~ dhruba$ g++
i686-apple-darwin11-llvm-g++-4.2: no input files

Apparently you can also download the command line package manually from ADC if you prefer (source).

Did this tip help you? Let me know in the comments!

16 thoughts on “Installing g++ and gcc on Mac OS X 10.8 command line

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s