Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

applefanboy4739

macrumors member
Original poster
Jul 10, 2011
58
0
Hello, I'm trying to learn the C programming language via the C for Dummies book. It said that mac osx has a built in compiler, but I can't find it. Can anybody tell me where to find a compiler and how to use it? or reference me to somewhere that can? I'm running Lion by the way. Thanks is appreciated. :)
 
Well, it doesn't - although before Mac OS 10.7 it was available on a DVD that came with the system so users could decide to install it themselves.

Which version of Mac OS are you running?
 
The compiler is part of the Mac OS Developer tools.

Prior to Mac OS X 7, an additional CD/DVD came the OS that included the Developer tools installer. Currently, for Snow Leopard or Lion, you can download the Developer tools from the Mac App store. The price has alternated between $5 and free.
 
Search for Xcode in the Mac App store. It's currently listed as free. It includes all the Developer tools, including the old-school command-line compilers.
 
Compiling can also be done via Terminal, if I'm not mistaken (I've been told so, but I've never actually tried it for myself as using Terminal is beyond me,) but there's not a chance that that was what your C for Dummies book intended.

Get Xcode from the Mac App Store. It's free if you're running Lion or $5 if you're running Snow Leopard. Alternatively, if you have the install disks for Mac OS X, one of them has the "Developer Tools" on it from which you can install Xcode (it'll be an optional install, you'll have to check a box somewhere to explicitly say you want them.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.