0% found this document useful (0 votes)
9 views

How to Setup OpenGL (GLUT) in CodeBlocks

This document provides a step-by-step guide to setting up OpenGL (GLUT) in CodeBlocks. It includes instructions on downloading necessary files, copying them to specific directories, creating a new GLUT project, and modifying the main.cpp file. Following these steps will enable users to build and run OpenGL projects successfully.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

How to Setup OpenGL (GLUT) in CodeBlocks

This document provides a step-by-step guide to setting up OpenGL (GLUT) in CodeBlocks. It includes instructions on downloading necessary files, copying them to specific directories, creating a new GLUT project, and modifying the main.cpp file. Following these steps will enable users to build and run OpenGL projects successfully.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

How to Setup OpenGL (GLUT) in CodeBlocks (Sivakas

version)

Steps to Setup OpenGL (GLUT) in CodeBlocks:


Step – 1

DwonloadCodeBlocksver 10.50

Step – 2

Download GLUT Library αποσυμπιέστε το αρχείο.

Step – 3

 Copy the glut.h file and paste to the folder “C:\Program


Files\CodeBlocks\MinGW\include\GL“.
 Copy the glut32.lib, glut32.dll, glut.def to the folder “C:\Program
Files\CodeBlocks\MinGW\lib“.
 Copy the glut32.dll file and paste to the folder “C:\Windows\System32“.

Step – 4
Open Code::Blocks. You’ll see the window as shown below.
Click on Create a newprojectlink.
Step – 5
Click on GLUT project, then click Go.

Enter the title name of the project, and give path to save the project.
The project file is created by default from the title name of the project.

Click Next.
Step – 6
For GLUT location, give the path “C:\Program Files\CodeBlocks\MinGW“

Click Next.

Click Finish.
Step – 7

Στο main.cpp που έχει δημιουργηθεί.


Πρέπει να προστεθεί το παρακάτω include:

#include <windows.h>
(ΠΡΟΣΟΧΗ πρέπει να μπει πριν από τα άλλα Include)

Build and Run, and you’ll see a window as shown below

You might also like