Visual Studio 11 GLFW external symbol error
c++, glfw, linker, opengl, visual-studio-2012
Solution
Ok, after very much trial and error I solved it.
- Use the 32-bit binaries
- Right click on the project -> Properties -> VC++
- Include Directories: C:\Users\MICHAEL\Desktop\glfw-3.0.3.bin.WIN32\include;$(IncludePath)
- Library Directories: C:\Users\MICHAEL\Desktop\glfw-3.0.3.bin.WIN32\lib-msvc110;$(LibraryPath)
- Linker -> Input -> Additional Dependencies add
- glfw3.lib and opengl32.lib
That solved it for me.
Problem
The basic code I use is the example from http://www.glfw.org/documentation.html I get this output: ``` 1>------ Build started: Project: ConsoleApplication1, Configuration: Debug Win32 ------ 1> Quelle.cpp 1>Quelle.obj : error LNK2019: unresolved external symbol _glfwInit referenced in function _main 1>Quelle.obj : error LNK2019: unresolved external symbol _glfwTerminate referenced in function _main 1>Quelle.obj : error LNK2019: unresolved external symbol _glfwCreateWindow referenced in function _main 1>Quelle.obj : error LNK2019: unresolved external symbol _glfwWindowShouldClose referenced in function _main 1>Quelle.obj : error LNK2019: unresolved external symbol _glfwPollEvents referenced in function _main 1>Quelle.obj : error LNK2019: unresolved external symbol _glfwMakeContextCurrent referenced in function _main 1>Quelle.obj : error LNK2019: unresolved external symbol _glfwSwapBuffers referenced in function _main 1>C:\Users\MICHAEL\documents\visual studio 2012\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : fatal error LNK1120: 7 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ``` The glfw3.h is in the VC/include directory. I've also added the glfw3.lib to the VC/lib folder and I added the glfw3.lib as an additional dependency to the linker input but I still get this errors. Any Idea why? I've used the precompiled binaries (which support MSVC2012 and 64x) http://www.glfw.org/download.html