Konrad Rudolph
Konrad Rudolph

Reputation: 545488

GCC without Xcode on OS X

I've just unwrapped my new MacBook Pro (yay!) and am now setting it up properly for development. Since I want to avoid clutter, I'm wondering if I really need to install the Xcode tools at all (I never use the IDE or Mac specific tools), since I'll install a newer version of GCC anyway, using MacPorts.

So, is there any benefit in installing Xcode? Is it necessary? What kind of set-up does it do behind the scenes? Basically: can I skip this or will it come back to haunt me because some Unix development tools just assume that OS X is always set up in this way?

Upvotes: 10

Views: 17382

Answers (7)

Brandan
Brandan

Reputation: 14983

Apple now provides the command line tools as a separate download from Xcode. They work with Lion and Mountain Lion. You can download them from the Apple Developer Center.

(This is noted on the osx-gcc-installer GitHub page.)

Upvotes: 0

shanemcd
shanemcd

Reputation: 578

A friend of mine recently released this:

https://github.com/kennethreitz/osx-gcc-installer

Have fun :)

Upvotes: 11

dbr
dbr

Reputation: 169535

You can strip down the Xcode install quite a lot - when you install Xcode there is a "Customise" button where you can remove a lot of stuff (gigabytes worth).

You can also go in and delete stuff from /Developer/, for example the 10.3 SDK is about 150MB (I think), and if you're not writing software for that it's quite safe to delete. Obviously be careful when deleting, but if you break things, you can always reinstall the Developer Tools!

Upvotes: 1

Jeremy L
Jeremy L

Reputation: 7797

In order to perform an easy and successful install of MacPorts, already having tools from the xCode installer is necessary. You only need the install option that places a copy of the unix/header files outside of xcode; everything else can remain uninstalled.

Upvotes: 14

Can Berk Güder
Can Berk Güder

Reputation: 113280

First of all, congratulations on the new MBP. I recently bought a 15" unibody myself. =)

You can safely skip Xcode installation, and you can install almost everything Xcode installs through MacPorts, except Xcode itself, of course.

However, I believe you'll find yourself installing Xcode one day anyway, and installing Xcode is much easier than installing all the tools (especially GCC) through MacPorts.

Upvotes: 1

Charlie Martin
Charlie Martin

Reputation: 112346

I tried this trick and I was constantly chasing missing header files and such. Just install XCode.

Upvotes: 7

dirkgently
dirkgently

Reputation: 111120

We primarily use the Xcode IDE for building Cocoa/Carbon applications. Xcode typically has different project templates (and project settings fixed accordingly). As long as you are not going to generate a Universal Binary or a framework I think you should be ok. As far as I am concerned, when I am too pissed with Xcode, I go back to the command line, set up the paths myself and start using GDB.

Upvotes: 1

Related Questions