tags:

views:

86

answers:

3

Are there any free c++ compilers for macs that do not need xcode?

+1  A: 

If you install the Developer Tools (which include Xcode), you get GCC installed as well. You can use it from the command line.

gcc -o myprogram main.cpp
jtbandes
How do I install the Developer Tools?
Ricky Demer
The developer tools are on one of the DVDs that come with OS X.
ggg
Is there any way to get them if I don't have the DVD anymore?
Ricky Demer
You can download them from http://developer.apple.com/
Jake Petroules
Yes download from Apple: http://developer.apple.com/technologies/xcode.html
Martin York
I suppose this is a correct answer, although it misses the point of not needing xcode, which is to avoid the proprietary license.
Ricky Demer
@Ricky: it doesn't require Xcode. It's just GCC. It's conveniently installed with Xcode.
jtbandes
@Ricky Demer: Is this way you are trying to bootstrap gcc? gcc is shipped under the GPL. Apple can not modify this license (even though it is shipped with XCode) and thus is perfectly usable.
Martin York
A: 

If you have very small needs, you might be able to use a an online IDE like compilr (http://www.compilr.com) or codepad (http://www.codepad.org).

Merlyn Morgan-Graham
A: 

download the latest iPhone SDK from developer.apple.com

it includes the XCode and GCC tool chain for both Mac and iPhone development.

you won't need any iPhone developer license if you are developing for Mac.

Jonny