Setting Up OpenGL for Windows
In the System Directory
- glu32.dll
- opengl32.dll
- glut32.dll
In the C++ Include Directory
- gl\gl.h
- gl\glu.h
- gl\glaux.h (probably won't need it)
- gl\glut.h (includes both gl.h and glu.h)
In the C++ Library Directory
- gl\glu32.lib
- gl\opengl32.lib
- gl\glaux.lib (probably won't need it)
- gl\glut32.lib
For .net, GLUT may have a conflict with stdlib.h
If so, try the following change in glut.h:
- extern _CRTIMP void __cdecl exit(int);
- to
- extern _CRTIMP __declspec(noreturn) void __cdecl exit(int);
Where to put OpenGL Files
- *.dll → WINNT\SYSTEM32 (for Windows 2000)
- *.dll → WINDOWS\SYSTEM32 (for Windows XP)
- *.lib → Program Files\Microsoft Visual Studio\VC98\Lib (for VC++6)
- *.lib → Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Lib (for VC++.NET)
- *.h → Program Files\Microsoft Visual Studio\VC98\Include (for VC++6)
- *.h → Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\gl (for VC++.NET)
Command Line Compile and Link
- cl /nologo /GX -o program.exe program.cpp