Skip to content

Instantly share code, notes, and snippets.

@akshay-verma
Forked from Nogbit/glfw-glew-opengl.md
Last active January 1, 2017 13:43
Show Gist options
  • Save akshay-verma/1caa0d81b4e0609219441f9e8e268345 to your computer and use it in GitHub Desktop.
Save akshay-verma/1caa0d81b4e0609219441f9e8e268345 to your computer and use it in GitHub Desktop.

Getting the VS project to build can be tricky, especially if you built the 64bit version of GLEW by accident. Anyways, this uses binaries and VS 2015. http://www.learnopengl.com/#!Getting-started/Hello-Window

  1. Make a new folder, OpenGL
  2. Download GLEW, binaries, extract to your new OpenGL folder http://glew.sourceforge.net/
  3. Download GLFW, 32 bit binaries, extract to your new OpenGL folder http://www.glfw.org/download.html
  4. Start a new empty C++ project in VS 2015
  5. Right click on your project, then "properties - C/C++ - General"
  6. Select "Additional Include Directories"
  7. In the following steps, replace [your path] with the path to your newly created OpenGL folder
  8. Now lets get VS to find the header files that you just downloaded to your new OpenGL folder...
  9. Make an entry for [your path]\OpenGL\glew-2.0.0\include
  10. Make an entry for [your path]\OpenGL\glfw-3.2.bin.WIN32\include
  11. Make an entry for C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt
  12. Now lets setup the linked.... "linker - general - Additional Library Directories"
  13. Make an entry for [your path]\OpenGL\glew-2.0.0\lib\Release\Win32
  14. Make an entry for [your path]\OpenGL\glfw-3.2.bin.WIN32\lib-vc2015
  15. Make an entry for C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10150.0\ucrt\[select architecture]
  16. Now lets link in the actuall lib files.... "Linker - Input - Additional Dependencies"
  17. Add each of these on their own line opengl32.lib, glfw3.lib, glew32s.lib
  18. Copy the full code as is from the Hello Window example on learnopengl.com
  19. Build Soltuion
  20. F5 (to run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment