The article directories
Download the Glut package, configure the environment, create a project and select File to create a new project, select Glut to fill in the project name and go to the Mingw folder in the root of your Codeblock directory and select Finish and add this header to your main file and it will run
One: Download the GLUT package
Download link
Two: Configure the environment
(1) Copy GLUT. DLL and GLUT 32. DLL from the GLUT package to C:\Windows\SysWOW64;
(2) : Copy Glut. h to MinGW\include\GL in the Codeblocks installation directory, for example: D:\ Codeblocks \MinGW\include\GL;
(3) : Copy Glut.lib, Glut32.lib to \MinGW\lib in the Codeblocks installation directory, for example: D:\CodeBlocks\MinGW\lib;
Three: the establishment of the project
Select File to create a new project, and select Glut
Fill in project name
Select the MinGW folder in the root directory where your codeblock resides
Select finish
Add this header to the main file and you’ll be ready to run
This represents that the environment is configured