This will work for the SlabGrid program.

Open a Terminal Window.

Migrate to the folder containing the program using the cd command:

cd foldername

cd subfolder


cd on its own takes you back to the root directory.

The command:


lists files and folders in the current folder. Use right mouse for copy and paste.

To compile type:

g++ SlabGrid.cpp -o ChrisProg -lm -lglut

To run type:


This works on the University of Bath Linux machines. On other machines you may have to install OpenGL.


Recent versions of OS X come with Xcode. Look in the folder Developer/Applications.

Create a 'C++ Tool' project. Add the .cpp source code and the GLUT framework and that's it!



Visual Studio

Visual Studio 2010