Download and Extract
- Go to GLEW main page and download Windows binaries. Current link is this for now (12/04/2016).
- Extract the file (Preferably into “Dependencies” folder of the project.
Adding Include
- Copy path of include (SomeOtherStuff\glew-VER.NUM\include\GL). For me it’s …\dependencies\glew-1.13.0\include\GL
- Go to your project opened in Visual Studio
- Go to Project Properties -> Configuration Properties -> C/C++ -> General -> Additional Include Directories
- Paste the path, be sure path is correct. Click OK (and Apply)
Adding Lib Files
- Copy path of .lib files. In here, if your project is 64-bit (x64), you should copy path of 64-bit folder (The path will be something like …\dependencies\glew-1.13.0\lib\Release\x64). If your project is 32-bit (Win32), then you should use path of 32-bit (something like …\dependencies\glew-1.13.0\lib\Release\Win32)
- Go to your project opened in Visual Studio
- Go to Project Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories
- Paste the path and click OK (and Apply).
- Finally, go to Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies and type the next there things: opengl32.lib glu32.lib glew32.lib
- Click OK, then Apply, and then OK. Hopefully, you are good to go.
Troubleshooting
Compile Time:
If you are sure you did everything correctly but, still have some unidentified problems, try to replace glew32.lib with glew32s.lib, and add #define GLEW_STATIC beginning of your code.
Run Time:
If it says something like “glew32.dll is missing”, just go to bin folder related with your project (64 or 32 bit), and copy-paste the dll into the same directory you .exe is located i.e. Debug file.