Back to main

Programming at Home

If you work seriously for the scheduled lab times and ask questions when appropriate, you should have no difficulty finishing the labs. However, if you fall behind due to browsing facebook, leaving early, and not asking questions when you feel lost, then you might want to do additional work at home to catch up.

If you have problems with the instructions below, then we'll try to help as best we can, but it's difficult to help with computer problems without the computer. If you have a laptop and bring it in, then we can probably help, but if you have a desktop and run into problems, we might not be able to do much.

Setting up the compiler


Most Linux distributions will come with a typical development environment (including gcc and make). If yours doesn't, install those packages. Note that some distributions have a gcc-base package which does not include the full gcc.


MacOS X comes with "Xcode" or "Developer tools", either as an extra CD, or as an optional install on the DVD. Once you install that, you will have a full developer environment.

You can either write text files and run gcc on the command-line, or run Xcode and compile from within that environment.


To get an experience similar to the lab setup, install cygwin. This is a free, open-source collection of programs.

Note that the basic cygwin install does not include gcc. To install it, you must select gcc4 and libncurses-devel during the "package selection" phase.

The package gcc4-core does not set it up correctly. For more information, see the cygwin documentation.

Another option is to install a different C compiler, such as the one in Microsoft Visual C++. For most of the material in this course, there is no problem with this software. However, see the warnings to the right.


In general, any C compiler will be able to handle the material we cover in this 1st-year course. However, there are a few exceptions.


Some of the labs use a library called ncurses. This is available on linux, MacOS X, and cygwin, but is probably not available for non-cygwin windows. If you are using Microsoft Visual C++, Borland Turbo C, Watcom C, or another windows-specific C compiler, then you cannot work on those exercises at home.


The labs use C that conforms to the ANSI C standard (sometimes called C89 or C90). Certain very old C compilers (i.e. pre-1990) might not accept these additions to the C language.

I really doubt that this will be a problem, though.

Creative Commons LicenseUnless otherwise noted, all materials on these pages are licenced under a Creative Commons Licence.