GLFW install in VS 17, unresolved external symbol

Hello everyone,

Before we start, i am new to the GLFW libraries and how they should work with VS 17. I’ve been doing C++ a few months now on my own, but my work so far hasnt required the use of many external libraries thus far – so i apologize in advance, if i miss something fundamental.

I have been trying to get GLFW set up in VS 17. I know i am missing something but i dont know what it is. There are two questions i have:

  1. I receive an “unresolved external symbol” error whenever i have a call to a glfw function, such as glfwInit. This error comes when i use the already built WIN64 glfw3.lib from this site. Is this issue because the binary doesnt support VS 2017 yet (it states its latest is VS 2015)? Or something basic,i overlooked?

  2. I have also used CMake to generate the VS 17 solution and then compile its code, as is recommended on this site. I am inclined to believe this is the way i should be doing it. But the step i am missing here is where i should be looking for the GLFW include folder when i use cmake – or am i looking at this the wrong way?

I am at work right now but can post more specific details later.

Thanks in advance

I managed to solve my own problem, and it was a pretty easily overlooked one:

#define GLFW_DLL

I was using this line when I was actually linking to a static library and not a DLL. This one line seemed to fix my problem.

1 Like