Dependencies for Visual Studio 2022

Hi, I successfully completed a walkthrough for usage of GLFW under Visual Studio 2022 presented in . Here I used the 64-bit Windows binaries downloaded from your site. Now I want to go through the Getting Started example. I copied the code displayed there into main.cpp of the project created following the movie.

In section of your docs I read: “The C/C++ development environments in Visual Studio, Xcode and MinGW come with all necessary dependencies for compiling GLFW…” , but apparently I miss some dependencies when trying to compile. I don’t use CMAKE, but use the Visual Studio setup system. I would appreciate some hints on which dependencies to install and how. Thanks!

If I am correct, at least I miss:

#include <glad/gl.h>
#include “linmath.h”

Solved the linmath.h issue as described in: c++ - Cannot open include file: 'linmath.h' - Stack Overflow

Still to solve: the <glad/gl.h> dependency

Hi @goofy2k and welcome to the GLFW forum,

Those headers are only needed if you are compiling the examples, or if you add them to your own project.

You need to make sure that you add the path to the dependencies to your Project > Properties > C/C++ > General > Additional Include Directories.

The dependencies should be in the deps folder in the GLFW download.

1 Like

OK, I’ll give it a try…

Got it working now! I was still using the glfw-3.4.bin.WIN64 folder from the first walkthrough. Triggered by your remark about the deps folder I started searching for another download.

Now I can continue my journey!