Alex Rivera | Logout

Mac OS X free C compiler

Asked 2009-06-27T13:41:22.777
11

Is there a small, free C or C++ compiler for OS X, like TCC?

Xcode is not small, or simple like TCC, AFAIK.

I'm looking for something like a GCC binary file or TCC for OS X.

Edit
Report

3 Answers

4

You can use Code::Blocks IDE its simple slick and hav good set of feture, a plus opensurce and ready to dl for 3 major plateforms

still recoment using Xcode if u just have to make projects for MAC, but if u are going to port it to linux and windows, then my choice is Code::Blocks [Give it a try atleast]

answered 2009-06-27T15:57:28.063
3

You could use the Xcode Tools that are already included in OSX.

Xcode is the same professional developer toolset used by Apple to create Mac OS X, as well as many great Apple applications, and Xcode is included with every copy of Mac OS X.

answered 2009-06-27T13:54:01.253
3

I know you want a small compiler, but it is best to just download and install Xcode. It is a great IDE. From there, you don't have to use it if you don't want to. Once it is installed, you can use something like this in terminal:

gcc myFile.c -o myFile

And that would build a source file called myFile.c which contains C code and the output module (executable) would be myFile. You'd execute it by running:

./myFile

Update: What is your reason for not wanting Xcode? Furthermore, is GCC itself ok (disregarding Xcode for a moment)? It's important to know that GCC is not a part of Xcode. Apple made use of GCC, which is an open source C/C++ (and more) compiler.

I just can't find binaries of GCC for mac so downloading Xcode is an easy way to get some...

Update 2: It also just came to my attention that NetBeans will compile C / C++ Code. It also uses the GCC compiler. I'm not sure if it using GCC from my Xcode installation but I thought I'd mention this.

Best Regards,
Frank

answered 2009-06-27T16:13:18.910

Your Answer