Configuration of OpenGL under CodeBlocks and solutions to problems encountered

The configuration process: https://blog.csdn.net/sophiale07/article/details/44965875
Undefined reference to ‘_XX OpenGL function name ‘.
Solution:
Add before include precompile directives that include OpenGL

 #define _STDCALL_SUPPORTED

 
If it still doesn’t work, add

#define _M_IX86  
#define GLUT_DISABLE_ATEXIT_HACK  

There may also be warnings, which can be removed by the following code:

#define GLUT_NO_WARNING_DISABLE

Modify the compilation and Makefile methods for undefined reference errors.
https://blog.csdn.net/huys03/article/details/2260949

Read More: