Setting up GCC on PC and Apple Computers
For the PC
GCC Installation
- Go to http://www.cygwin.com/setup.exe which will download the installation file. You may have to click OK to acknowledge a security warning.

- After you locate and run the setup file, click NEXT on the first page.

- Verify that "Install from Internet" is selected, and click NEXT again.

- Verify that the Root Install Directory is "C:\cygwin", accept the other defaults, and click NEXT.

- Accept the default Local Package Directory location, and click NEXT.

- Verify that the Internet Connection type is "Direct Connection", and click NEXT.

- Choose a download site, and click NEXT. The first listed site should be fine, but if it cannot be reached, pick another.

- On the package selection screen,expand the category "Devel"

and find the entry starting with "gcc-core". Where this entry says "SKIP", click once and it should change to "3.4.4-999" (or something similar). Click NEXT.

- Sit back and wait for the installation to run. At the end, it should create a shortcut on your desktop called Cygwin, which will launch the command shell for running gcc.
- (Optional) To have Cygwin open into your My Documents directory, right-click My Computer.

Under the Advanced tab, click the "Environment Variables" button. Add a new user variable by clicking the first "New". Create a new variable name called "HOME" (without the quotes) with value "%USERPROFILE%\" (again without quotes). Click Ok on all windows.

- Cygwin will now open to your My Documents directory.
Syntax Highlighting Editor
For visual clarity, it is recommended that you use a syntax highlighting editor to edit your code.
A very basic Windows-based editor called NotePad 2 can be found at the following site:
http://www.flos-freeware.ch/zip/notepad2.zip
Unzip the file and run notepad2.exe.
For the Apple Computer
How to Install the XCode/GCC Compiler
There are two ways to install the files you need to be able to compile your code. You can either download the software from Apple, or alternatively obtain the software from the Mac OSX CD-ROM.
METHOD 1: Downloading XCode From Apple
- Click this link to download Apple's XCode tools for your Macintosh. Apple requires you to complete a simple registration in order to download the software from them. They won't spam you, so you shouldn't worry about registering:
https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20481
- After completing the download (which is a tad large-it will take a little while), you should find a file .dmg in the location that your browser downloads files to (probably the desktop).
- Double click this file. An icon named "Xcode Tools" should pop up on your desktop. Inside the folder, double click the file "XcodeTools.mkpg". Follow the instructions that the installer provides. It's a simple installation.
- You should now be able to open the XCode application, or your Terminal, and begin compiling.
METHOD 2: From the Mac OSX CD-ROM
- Insert the disk into your drive, open it, and look for the folder titled "Developer Tools". (Note: those with OS10.4 CDs may find that they have a separate CD titled "Developer Tools" on
which they will find XCode) If there is a folder titled "XCode Tools", go ahead and click on it. Find the XCode installer (probably labeled "XCodeTools.mkpg"). Double click this file, and follow the instructions that the installer provides. It's a simple installation.
- Just like above, you should now be able to open the XCode application, or your Terminal, and begin compiling.
Syntax Highlighting Editor
XCode has an embedded editor that has syntax highlighting. Create a New Empty File. Go to the Format menu, and under the Syntax Coloring menu, select C. Your file is now ready for editing.