In this tutorial I will guide you on how to install code::blocks compiler and configure it with OpenGL for Windows
The procedure is similar if one wishes to install Code::Blocks on Mac and the link for the OpenGL installation is given at last.
DOWNLOADING AND INSTALLING GLUT
1.Visit the following link and download Code::Blocks
http://www.codeblocks.org/downloads/26
2. Execute the codeblocks-12.11mingw-setup.exe file and follow the wizard. On Choose Component screen choose Full: All plugins, all tools, just everything from the dropdown list
3. Thus, after completion of wizard Code::Blocks IDE is installed with MinGW
Installing OpenGL (freeGLUT) library
1. Visit Page : http://freeglut.sourceforge.net/index.php#download
And select the binary link of OpenGL library
{ The above link will lead to this webpage : http://www.transmissionzero.co.uk/software/freeglut-devel/
it will not download library it will lead to its source page, I apologise for error in snapshot, the snapshot of download page is given below }
The link will download the file freeglut-MinGW.zip
2. Unzip the file and it will have the following contents
For 32-bit windows : Select all content and paste in the directory
"C:\Program Files\CodeBlocks\MinGW"
For 64-bit windows: Select all content and paste in the directory
"C:\Program Files (x86)\CodeBlocks\MinGW"
CONFIGURING CODE::BLOCKS
1. Click Setting on Menu Bar
2. Click Compiler
3. Click Linker tab and add the libraries names in the order as shown in the snapshot
For further Guidance on configuring Projects visit the following links :
For Tutorial on freeGlut Mac Installation visit this link: http://lazyfoo.net/tutorials/OpenGL/01_hello_opengl/mac/index.php