Eclipse_opengl_glut_setting
OpenGL generally uses vs to develop, I personally prefer eclipse, this is the configuration of eclipse using glut
First download the glut package, which contains the following 5 files:
- Glut.dll
- Glut.h
- Glut.lib
- Glut32.dll
- Glut32.lib
Here's a download link: http://www.opengl.org/resources/libraries/glut/glutdlls37beta.zip
Put Glut.dll Glut32.dll in C:\Windows\SysWOW64
Place the glut.h under the installation path of the MinGW $minGW _HOME\INCLUDE\GL below
Put Glut.lib and Glut32.lib under the $minGW _home\lib.
Download Winglut:http://web.cs.wpi.edu/~gogo/courses/mingw/winglut.zip
Put the LIBGLUT32WIN.A under the $mingw_home\lib.
Create a C + + project in Eclipse, open the properties of the project, find the properties------>c/c++ Build------->settings-------->mingw C linker------->libraries, adding in Libraries (-L)
Glut32winglut32glu32opengl32winmmgdi32
After saving the changes, the configuration is complete, and the following two header files are required for use:
#include <windows.h> #include <gl/glut.h>
Eclipse OpenGL GLUT Runtime Environment configuration