Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 cannot open 'glfw3.lib'

I'm having a few issues getting GLFW3 set up. I've downloaded the 64-bit binaries from the official site, added glfw3.dll, glfw3.lib and glfw3.h to their respective places, specified the proper include, and added the appropriate linker input to my project. However, when I test the library with glfwInit(), VS spits this out:

error LNK1104: cannot open file 'glfw3.lib' Path/To/Project

My guess was that VS didn't know what directory the library was in, but seeing as it's in the IDE's own lib folder, I don't think this is it. Does anyone have any suggestions? Sorry if this has already been solved, I got in as deep as to read the steps of compilation before I gave up searching.

Edit: I also changed the solution platform to x64, since I am using the 64-bit GLFW binaries.

like image 992
Patrick Bartlett Avatar asked Apr 20 '26 03:04

Patrick Bartlett


1 Answers

Following Andon M. Coleman's advice, I moved the headers and library folders to a new directory outside of Visual Studio's built-in ones (D:\opengl-wrappers\lib & D:\opengl-wrappers\include, for example). After including those libraries in the project settings (C/C++->General-> Additional Include Directories and Linker->General->Additional Library Directories), everything compiled beautifully.

like image 161
Patrick Bartlett Avatar answered Apr 22 '26 19:04

Patrick Bartlett