Sunday, January 22, 2012

Adding GCC, Git, and friends to Path after Installing XCode 4.3

My hard drive died this week, so I decided to purchase an SSD. Best decision ever—my little old macbook is a bazillion times faster. It's always a great feeling to start fresh; I love reinstalling all my apps and getting organized. It's a very empowering feeling to reintroduce order to one's life.

Since I was starting fresh I decided I didn't want to install the old XCode, and so would just skip straight to the new XCode 4.3 Preview, which requires no installers and just comes completely self contained.

However, many of us like to develop outside of XCode from time to time, and woud like to have our compilers, debuggers, and Git available to us. I knew XCode 4.3 was providing these things, because I was able to compile my projects, but they were not showing up when I tried to run them from the terminal.

After a little digging, I finally found the bin folder with all our friends in the package contents of the XCode app. To use GCC, GDB, Git, and other various utilities from the command line, just add this to your path:

/Applications/Xcode.app/Contents/Developer/usr/bin


Enjoy.

2 comments:

Joey Baker said...

Once you go SSD, you never go back :)

Jason said...

Seriously. Theoretically I always knew how much of a bottleneck my hard drive was, and I had experienced SSD on other machines before—but I just assumed they were faster in general. I didn't realize this little ol' 2008 MacBook could feel fast.