Masters of the Void [The Void]
1. What you need

Home | Next

[Xcode Icon]Computers really only understand ones and zeroes. Since it would be rather unwieldy to write your programs using only ones and zeroes, there are programming languages like C which are a more memorable text representation of a program, usually referred to as source code.

To write a program, one needs a text editor, and to translate this text representation of a program into actual ones and zeroes that the computer can run directly, we need a compiler. On the Mac, you usually use a program called Xcode, which is a text editor that integrates a compiler called "GCC". Xcode comes with every copy of Mac OS X as part of the Xcode Tools installer in the "Optional Installs" on one of the system discs. Simply double-click the installer and follow the instructions.

Occasionally, Apple releases new versions of Xcode. To get these, go to Apple's Developer web site and sign up for a free Apple Developer Connection Online account. Once you log in using that account, you can find new versions of Xcode on your Downloads page.

Once you have installed Xcode, you can find the Xcode application and a number of files and helper programs it relies on in the "Developer" folder at the top level of your hard disk. Xcode itself is in the "Applications" folder inside "Developer".

Home | Next

Reader Comments: (RSS Feed)
michael writes:
The PDFs link to a website and ask for a Password rather than going to the next PDF
Uli Kusterer replies:
michael, you're right, seems I didn't fix up the links when generating the PDFs. Will be a bit involved to do that, though, so not sure when I'll be able to fix that.
Gnome writes:
Awesome article! I never even knew I had that app!
David writes:
Great tutorial on C. Memory allocation and use of pointers are clearly explained. Good for those who already know computer programming, either on C or other languages.
Sanjay Shukla writes:
I found the content on this site a great guide to someone learning C on MAC using Xcode and is a beginner. I have one question? Can we have multiple program under one project (main.c , say another sub1.c )? And still abl to complie and run all of them at one go? How does this work? Thanks & Regards
Uli Kusterer replies:
Sanjay, we'll later get to having one project made up of several files. If you really meant create several programs as the final output (but this is a fairly advanced topic that won't be covered in this tutorial), Xcode has "Targets" which can be used to create different programs with one project. You can also have several projects and then establish "dependencies" between them, by dragging one project's icon into another project's "Groups and Files" list, which will then make it show up in the "Dependencies" section of your Target's "Info" window. Generally, Targets are used for variants of the same code (e.g. if you have a framework, and a command line tool that both do the same thing) and separate projects are used for actual different programs.
Garotas* writes:
Thanks Uli for putting up this site. This is so awesome.
College student writes:
X code is awesome. I recently used it to program with the java language and it worked great! Now I will attempt to learn C with it.
Efel writes:
Hi! I use a Mac OS X 10.4.11, I searched for Xcode in the finder, but it didn't find anything, then I downloaded it from the Apple website, but the installer wouldn't open the file (Xcode.mpkg). Does anyone have any idea why? Thanks!
Uli Kusterer replies:
Efel, you need the right version of Xcode for your system version. If you still have your Mac OS X install CDs, there should be a folder with "additional installers" or something like that on it, containg an Xcode installer that will work on your OS X version. Alternately, log in at http://connect.apple.com (if you don't have an ADC login, get one, it's free) and check out the Downloads section, I think if you scroll down you can find older Xcode versions there as well.
Joshua Muniandy writes:
Hi, are there tools for me to write & compile the app on a Win or Linux machine? I am a total noob in C programming and will want to learn to develop for iphone apps (was a programmer way back many many years).
Uli Kusterer replies:
Yeah. Look for GCC (The GNU compiler Collection) and any IDE (Integrated Development Environment) or text editor. Sadly, your choice depends a lot on what Linux distribution and window manager you're using and similar things. I'm a Mac user, so I'm not really up to speed with all the different Linuxes out there, but maybe this will help you find the right one.
Supaman writes:
Hi, I am trying to find the PDF of this website but I can't find it! However, a lot of people speak about it, does it actually officially exists? Thanks for this tutorial! Cheers
sathyaventhan writes:
how to remove the keyboard
Uli Kusterer replies:
Supaman, I took down the PDF. They were getting out of date, and I couldn't put the movies into the PDFs so one can print them, so there wasn't much point in a PDF version.
[n3rve] writes:
I've just come across this site based on a recommendation I read from a blog post, and the content looks promising. I've attempted C/C++ and PHP and I have an idea of the syntax, hopefully I get along fine here. :)
me writes:
Testing one two
Vilhelm writes:
Hey - can't wait to get going! Thanks for the tutorial...
dharmeshtx writes:
I already learned c on pc. But I am proud user of mac now so I want to know what difference is with the Mac. Hope this journey has the great destination.
Lyn writes:
Looks a really nice first-timers course on Objective-C. But what has gone wrong with the on-screen formatting? On my PC and Mac, using any browser, Some pages have the sample code showing as one huge line, without a carriage return, which can't really be followed smoothly. The formatting on Page-3 is fine, then it goes to all on one line again on page-4 and others. I hope this can be fixed.
Michael Borges writes:
Muito bom esse material sobre Xcode. Meus parabéns!
Ashish Bhargava writes:
Need to go through the articles and learn more on C.
Comment on this article:
Name:
E-Mail: (not shown, hashed for Gravatar)
Web Site URL: (optional)
Comment: (plain text only)
Please Enter the following word:
Or E-Mail Uli privately.