There are a number of things that you need to do:
i Download Dev-C++ 5.0 beta 9.2 (4.9.9.2) with Mingw/GCC 3.4.2 from www.bloodshed.net
ii Download glut (OpenGL) from devpaks.org
iii Download Pthreads from devpaks.org
iv Download pthreadgc2.dll from www.dll-files.com
All these files can be downloaded in one zip file.
Install Dev C++ by clicking installer
Run Dev C++ and open the package manager:
Tools->Package Manager
Install the glut and Pthreads (if using threading) package:
Package->Install Package
Exit package manager
Make a new project:
File->New->Project...
Select Empty Project type from the Basic tab window
Make sure C++ project is selected
Create the new project in the folder with the source file. A copy of pthreadgc2.dll will probably (?) be required in the same folder when you run the program, if you are using threading
Add the .cpp file to the project:
Project->add to project
select the .cpp file
Define the linker options:
Project->Project options
In the Parameters tab window add the following line in the Linker pane:
-lglut32 -lglu32 -lopengl32 -lwinmm -lgdi32
click ok
If you are using Pthreads you also have to add
-lpthreadGC2
in the Linker pane
Compile and run the project:
Execute->Compile & run