Setting Up GLEW for Visual Studio

Download and Extract

  1. Go to GLEW main page and download Windows binaries. Current link is this for now (12/04/2016).
  2. Extract the file (Preferably into “Dependencies” folder of the project.

Adding Include

  1. Copy path of include (SomeOtherStuff\glew-VER.NUM\include\GL). For me it’s …\dependencies\glew-1.13.0\include\GL
  2. Go to your project opened in Visual Studio
  3. Go to Project Properties -> Configuration Properties -> C/C++ -> General -> Additional Include Directories
  4. Paste the path, be sure path is correct. Click OK (and Apply)

Adding Lib Files

  1. 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)
  2. Go to your project opened in Visual Studio
  3. Go to Project Properties -> Configuration Properties -> Linker -> General -> Additional Library Directories
  4. Paste the path and click OK (and Apply).
  5. Finally, go to Project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies and type the next there things: opengl32.lib glu32.lib glew32.lib
  6. 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.