0
votes

Probably the most asked question on GLFW ever. But I've tried everything I can think of and after 3 hours of googling I give up.

What I've been able to understand is that this error occours when:

The compiled code for function makes a reference or call to symbol, but that symbol isn't defined in any of the libraries or object files specified to the linker.

That means I must have simply failed linking the library as I understand.

Ok so located in: "C:\dev\MyVSProjects\MyWorld\dependencies\OpenGL\GLFW\lib-vc2015" is my glfw3.lib file.

Inside of my solutions Property Pages I set "Additional Library Directories" to "$(SolutionDir)dependencies\OpenGL\GLFW\lib-vc2015" which is where the above file is located relavtive to the .sln file.

Then finally in the linker I set Additional Dependencies to: "opengl32.lib;glfw3.lib;%(AdditionalDependencies)"

Thats pretty simple, and I just dont understand how that cannot be linked correctly.

Im using glad in my project btw and it works correctly, also both the glfw3.h and glad.h files are found. (And yes im including glad.h first).

Yet every GLFW function gets the unresolved external symbol error.

So my question is why am i still getting these unresolved external symbol linking errors.

1

1 Answers

-1
votes

Alright so it turns out I did do everything correctly. The 64-bit binaries simply does not work with Visual studio 17...

If your experienceing the same issue simply get the 32 bit binaries.