Configure OpenGL in CodeBlocks

There are many online tutorials, but some are easy to use and some are not.
There are two broad categories. One is that you don’t have to manually add libraries after you’ve configured them, but a New GLUT Project is needed to create a New Project instead of the usual Console Application. This category can refer to this document: https://wenku.baidu.com/view/7396dc8783d049649b66588c.html
Another type of configuration method, when configured, will be a New normal Console Application, but you will need to manually add the OpenGL library.
I chose the second category because I found that the console could not be tuned out of the configuration method of the first category, so I could not see the output of the console. Debug is very inconvenient, so I haven’t found a solution yet.
General reference is http://www.yalewoo.com/opengl_notes_2_use_opengl_in_codeblocks.html, but is not identical also, built after the project need to add one more libraries.

Steps:
Glut. h goes into the MinGW\include\GL directory of the compiler. .
glut32 lib in MinGW \ lib directory
glut32. The DLL into the C: \ Windows \ System in

Open the codeblocks create the console program, and then in the project to build the options – would add three static link library glut32 Settings. The lib, libopengl32. A, as well as libglu32. A, their paths in the lib folder of the compiler.

Read More: