You can specify directly the download locations into your project Properties for headers (to #include GLFW/glfw3.h in your source code) and DLLs (to have VS link against these libraries), respectively.įor Cygwin, GLFW is trickier, because you can no longer link against it directly from the download location. The same download works for both VS and Cygwin. You can place it also in a custom folder, say C:\OpenGL\glfw-3.3.4.bin.WIN64. For our 64-bit setup, you need the Windows 64-bit precompiled binaries. With these values for INCS, LIBS, and LDLIBS respectively, you can then link using the UNIX naming conventions as shown in the complete Makefile, at the bottom of the post. GLEW dynamic library directory: /cygdrive/c/OpenGL/glew-2.1.0/bin/Release/圆4 GLEW static library directory: /cygdrive/c/OpenGL/glew-2.1.0/lib/Release/圆4 GLEW headers directory: /cygdrive/c/OpenGL/glew-2.1.0/include These can be specified in your VS project's Properties menu.Ĭygwin: You can link against this library from Cygwin as-is, meaning you can specify its download directory for the INCS, LIBS, and LDLIBS variables in your Makefile as follows (consistent with the download directory specified above):
GLEW static library: C:\OpenGL\glew-2.1.0\lib\Release\圆4\glew32.lib GLEW headers (to #include GL/glew.h): C:\OpenGL\glew-2.1.0\include The same download works for both Visual Studio and Cygwin.
Visual Studio: Download 32-bit/64-bit binaries from and install in a custom folder, say C:\OpenGL\glew-2.1.0. OpenGL dynamic library (uses the Windows DLL): C:\Windows\SysWOW64\opengl32.dll OpenGL static library default location: /lib/w32api/libopengl32.a The same applies for all other dynamic libraries under Visual Studio. The opengl32.lib library will need to be specified under the VS project Properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies. OpenGL DLL: C:\Windows\SysWOW64\opengl32.dll OpenGL static library: C:\Program Files(x86)\Microsoft Visual Studio\2019\Community\SDK\ScopeCPPSDK\vc15\lib\SDK\lib\opengl32.lib
Visual Studio: The following default locations are valid for current versions of Windows 10 and Visual Studio 2019. You need three libraries: OpenGL, GLEW, and GLFW. You will be able to use both development environments with the same code (same includes and libraries), so you can switch between the two as you see fit. I will present a Windows 10 64-bit setup for Cygwin that uses the same libraries as Visual Studio.
I do not normally post answers this long, but this one is worth it.