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 [Link], [Link], [Link] to the folder “C:\Program
Files\CodeBlocks\MinGW\lib“.
Copy the [Link] 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
Στο [Link] που έχει δημιουργηθεί.
Πρέπει να προστεθεί το παρακάτω include:
#include <windows.h>
(ΠΡΟΣΟΧΗ πρέπει να μπει πριν από τα άλλα Include)
Build and Run, and you’ll see a window as shown below