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:
a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.
Mingw-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems.
combines the most recent stable release of the GCC compiler, a few patches for Windows-friendliness, and the free and open-source MinGW.org or MinGW-w64 runtime APIs, to create a more lightweight open-source alternative to Microsoft’s compiler and platform SDK.
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.
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:
From the Select Edition dialog, select the 64-bit 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:
From the Components dialog select the default TDM-GCC Recommended installation:
and press .
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:
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:
and press . This brings up the Environment Variables dialog:
Select the Path entry under System Variables and press . This brings up the Edit environment variables dialog:
Press . This brings up the Browse for Folder dialog:
and browse to the C:\MinGW\bin folder, and press . This adds this folder to the environment variables list:
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.