最近又重装了系统,调程序的时候发现Opengl没有了,就又装了一遍,把整个过程写下来,省得以后忘了。
1. Copy glut32.lib and glut.def to C:\Program Files\Microsoft Platform SDK\Lib
2. Copy glut.h to C:\Program Files\Microsoft Platform SDK\Include\gl
3. Copy glut32.dll to C:\WINDOWS\system
4. Revise glut.h, otherwise you will meet the error "c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdlib.h(251): error C2381: ‘exit’ : redefinition; __declspec(noreturn) differs"
#if defined(_WIN32)
# ifndef GLUT_BUILDING_LIB
/*extern _CRTIMP void __cdecl exit(int);*/
_CRTIMP __declspec(noreturn) void __cdecl exit(int);
# endif