Setting Up OpenGL for Windows


In the System Directory

In the C++ Include Directory

In the C++ Library Directory

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