8

Possible Duplicate:
Is there a way to install gcc in OSX without installing Xcode?

Is there any way to just install the gcc compiler on mac osx without the entire xcode development monstrosity? The latest xcode download is 4.5GB and all I want to do is compile something with gcc. That is a tad bit of overkill.

Surely there is a better way?

[Now this is supported in OSX XCode command line tools]

Community
  • 1
  • 1
Ben
  • 9,725
  • 6
  • 23
  • 28
  • possible duplicate of [GCC without Xcode on OS X](http://stackoverflow.com/questions/583360/gcc-without-xcode-on-os-x) and [Is there a way to install gcc in OSX without installing xcode](http://stackoverflow.com/questions/114884/is-there-a-way-to-install-gcc-in-osx-without-installing-xcode) – David Gelhar Mar 15 '11 at 04:14
  • `gcc` should come by default, I believe. Try `man gcc` in terminal. – Mahesh Mar 15 '11 at 04:14
  • You are right ... it is a dup ... missed those on the question create. It seems it can't be done. – Ben Mar 15 '11 at 04:45

4 Answers4

5

In February 2012 Apple released the command line tools for Xcode as a separate download: https://developer.apple.com/downloads/index.action

For background you can read this post from the author of the osx-gcc-installer project: http://kennethreitz.com/xcode-gcc-and-homebrew.html

Jason
  • 2,025
  • 2
  • 21
  • 13
4

While it is definitely possible to install gcc without Xcode, it seems that nobody packages it in such a way...
That said, it does seem like your main reason for asking is to avoid the large download? If you still have the OS install discs that came with your Mac then we can get Xcode installed without having to download it from scratch.
On the root level of the DVD should be an Optional Installs folder that contains an Xcode installer.

Edit: maybe there is a way after all!
This page links to binaries of gcc for System 10.6:
http://hpc.sourceforge.net/

Coxy
  • 8,844
  • 4
  • 39
  • 62
  • Thanks for the tip on installing from CD ... the binaries look interesting ... I played with them but they don't include `make` so I seemed to still have issues ... just biting the bullet and installing xcode. – Ben Mar 15 '11 at 05:18
0

Here is the place where I got the CLT without Xcode. Hope it works. https://www.dropbox.com/sh/pneetxuvlljc6m0/jlRLmI4MBo/xcode44cltools_10_86938106a.dmg

big-circle
  • 547
  • 2
  • 11