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:
Strawberry Perl is a perl environment for MS Windows containing all you need to run and develop perl applications.
It is designed to be as close as possible to perl environment on UNIX systems.It includes perl binaries, compiler (gcc) + related tools, all the external libraries (crypto, math, graphics, xml…), all the bundled database clients and all you expect from Strawberry Perl.
It is the simplest to install of the compilers listed here.
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.
It is the second simplest to install of the compilers listed here.
a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.
Non-trivial to install to put it mildly.
Mingw-w64 is an advancement of the original mingw.org project, created to support the GCC compiler on Windows systems.
Non-trivial to install, but slightly less difficult than Cygwin.
Unless you have a pressing need for complete linux compatibility, Strawberry Perl is sufficient for use in CP264.
For an IDE 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. You are not required to use Eclipse.
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.
To install the Strawberry Perl compiler for Windows, go to:
Strawberry Perl
and
download the Latest Release, which is a Windows MSI
installation file. Execute this file, and it installs Strawberry Perl
into C:\Strawberry, which is fine, and sets up all environment
variables on Windows for accessing the C executables and libraries.
The Strawberry version of MinGW should now be available as the MinGW Tool Chain on Eclipse, or through your Windows command prompt.