How to Install OpenGL on CodeBlocks

Mahmud HasanC++, Graphics, OpenGL, Tutorial, WindowsLeave a Comment


In this tutorial you will learn How to Install OpenGL on CodeBlocks only with 10 Easy Step.

1. Try to install Code:: Blocks 12.11 version; later versions may face some Compiler conflicts.

2. Copy glut32.dll to c:\windows\system


3. Copy glut.h to
C:\Program Files\CodeBlocks\MinGW\include\GL.
C:\Program Files (x86)\CodeBlocks\MinGW\include\GL.


4. Copy glut32.lib to
C:\Program Files\CodeBlocks\MinGW\lib
C:\Program Files (x86)\CodeBlocks\MinGW\lib


5. Now you’re ready to start Code::Blocks and make a new project.
Open up Code::Blocks. Start a new Project by going to File, New, Project.


6. To make new project, select GLUT project and press Go to continue.


7. Press Next in this menu.Slide8

8. Give a project title, and a location where the project will be created and saved, then press Next.


9. Let Code::Blocks know where you stored your GL files, C:\Program Files\CodeBlocks\MinGW
C:\Program Files (x86)\CodeBlocks\MinGW
then press NextSlide10

10. In the manager window (viewable by pressing Shift-F2), open up the sample source file by double clicking on it. To make your program work, you will need to add this at line 14:
#include <windows.h>Slide12

If you build & run the project and see the proceeding window, congratulations, GLUT works for you!


Mahmud Hasan

Mahmud Hasan

I had my first technical epiphany when I created a yahoo email account in 2003. It inspired me to look into programming and web design. I'm currently completing my BSc in Computer Engineering and pursuing my dream as a programmer.
Mahmud Hasan

Latest posts by Mahmud Hasan (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *