Skip to content

Instantly share code, notes, and snippets.

@Nogbit
Last active January 1, 2017 13:48
Show Gist options
  • Save Nogbit/6be8898898dbc9628445af33e8bd97ae to your computer and use it in GitHub Desktop.
Save Nogbit/6be8898898dbc9628445af33e8bd97ae 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. Now lets setup the linked.... "linker - general - Additional Library Directories"
  12. Make an entry for [your path]\OpenGL\glew-2.0.0\lib\Release\Win32
  13. Make an entry for [your path]\OpenGL\glfw-3.2.bin.WIN32\lib-vc2015
  14. Now lets link in the actuall lib files.... "Linker - Input - Additional Dependencies"
  15. Add each of these on their own line opengl32.lib, glfw3.lib, glew32s.lib
  16. Copy the full code as is from the Hello Window example on learnopengl.com
  17. Build Soltuion
  18. F5 (to run)
@grnrrtrr4444
Copy link

Thank you so much man! This worked perfectly!

@akshay-verma
Copy link

Additional paths also needs to be included in the project (for Universal CRT SDK.)
Edited it accordingly, please consider merging.
https://gist.github.com/akshay-verma/1caa0d81b4e0609219441f9e8e268345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment