Compiling C/C++ source code

Most Unix or Linux users will already have access to a C/C++ compiler. Most MicroSoft Windows users will need to obtain one. I am not sure about Apple Mac Users

Obtaining a C/C++ compiler

For MS Windows users, I suggest downloading DJGPP and following the comprehensive instructions. The documentation is excellent. After following these step, you should be able to type "gpp" at the DOC command prompt to invoke the compiler. Try this example: if you have a file called test.cpp that contains the following:

#include <iostream>
using namespace std;
int main()
{
    cout << "Hello World!\n";
    exit(0);
}

then try entering the command
gpp -o test test.cpp
which should produce the output
outpout here...
By then typing test (or test.exe) at the command prompt, you should be running a program that produces some text on the screen...

Make files

Typically, the code available on my site will have a Makefile that tells the compiler to automatically compile a number of different files. If you have downloaded the full complement of DJGPP code, you will also have the make utility installed. Simply type make when you are in the directory with the source files in. If this does not work, you might need to change the first line of the Makefile from "g++" to "gpp" or to "gcc".