1. Copy the library file and header file of OpenGL.
If you do not have OpenGL library files and header files, you can search and download them from the Internet, which is easy to find.
Copy the. dll file (including four files: glu. dll, glut. dll, and glu32.libopengl. dll) to the system disk c: \ windows \ system32.
Copy the. h file (including gl. h glaux. h glext. h glu. h glut. hwglext. h) to the installation directory of Visual c ++.
Take my example C: \ program files \ Microsoft visualstdio \ VC98 \ include \ GL. Generally, there will be GL folders. If not, just create one.
Copy the. lib file (including seven files: glaux. lib glu. lib glu32.libglut. lib glu32.lib opengl. lib opengl32.lib to C: \ programfiles \ Microsoft visual stdio \ VC98 \ lib)
2. project configuration.
For VS2008 development:
Create a Win32 console project and configure project properties:
(1) project -- project properties -- configuration properties -- C/C ++-Preprocessor -- pre-processor definition, add
Glu_building_lib
(2) project -- project properties -- configuration properties -- linker -- input -- Additional dependency, add
Glu32.lib Opengl32.lib Glu32.lib glaux. lib
From Wang Lixin's column