How to Install OpenGL on CodeBlocks

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

Slide13

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.

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

Slide3

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

Slide4

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

Slide5

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.

Slide6

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

Slide7

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.

Slide9

9. Let Code::Blocks know where you stored your GL files, C:\Program Files\CodeBlocks\MinGW
OR
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!

Slide13

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 *