Installing a C Compiler

In general, installing a C compiler for almost any system can be difficult and frustrating, since most install packages seem to be written by computer nerds for computer nerds, and clearly if you don't know exactly what you need to be installing, then you should be installing it.

For our courses, there are a number of compilers that, with suitable caution (compiler version, compiler defaults, and other potential issues) can be used. Some of these compilers are:

For the Winter 2024 term, for Windows users, we suggest using the TDM-GCC compiler due to it's extreme ease of installation. We will monitor how well it works throughout the term.

For an ID we suggest using Eclipse, as it runs on Windows, Macs, and Linux, and we can provide help for its set up and use. We cannot guarantee too be able to provide help for other IDEs.

Install TDM-GCC

To install the TDM-GCC compiler for Windows, go to:
TDM Download
and download the tmd64-gcc-latest_version.exe file. Execute it as an Adminstrator. (In Windows Explorer right-click on the .exe file and choose Run as administrator from the drop-down menu.)

Complete the rest of the instructions, but in particular change the installation directory as noted below.

From the Wizard dialog, select Create:

TDM Wizard

From the Select Edition dialog, select the 64-bit edition:

TDM Edition

From the Installation Directory dialog, enter:

C:\MinGW

as the installation directory. This is important when using Eclipse, as this is the default directory that Eclipse searches for an installation of the MinGW compiler:

TDM Directory

From the Components dialog select the default TDM-GCC Recommended installation:

TDM Components

and press .

Update Path

You now have to update your system path so that your system can find the TDM-GCC executable files.

Note that different versions of Windows may look somewhat different than the images shown here, and the actual data shown will be different, but the basic idea is the same.

From the Windows search, type environment and you should see a result like:

Windows Search

You may be required to use Administrator Privileges to do the followng. Click on Edit the system environment variables to bring up the System Properties dialog:

Windows System

and press . This brings up the Environment Variables dialog:

Environment Variables Dialog

Select the Path entry under System Variables and press . This brings up the Edit environment variables dialog:

Edit Environment Variables Dialog

Press . This brings up the Browse for Folder dialog:

Browse for Folder Dialog

and browse to the C:\MinGW\bin folder, and press . This adds this folder to the environment variables list:

Folder Added

Press until you return to your Windows desktop.

The TDM version of MinGW should now be available as the MinGW Tool Chain on Eclipse, or through your Windows command prompt.