Skip to main content
GameDev.net gamedev.net
🔒 Locked

Visual Studio 11 GLFW external symbol error

Started by ~Helgon Nov 26, 2013 at 11:07 PM 1 replies 14.3k views
Original Post
~Helgon
~Helgon

Hey, I have follow problem.

I wanted to start using OpenGL with GLFW but when I try to run the example I get following errors:

Code: http://www.glfw.org/documentation.html

Error:


1>------ Build started: Project: Test, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol _glfwInit referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _glfwTerminate referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _glfwCreateWindow referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _glfwWindowShouldClose referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _glfwPollEvents referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _glfwMakeContextCurrent referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol _glfwSwapBuffers referenced in function _main
1>C:\Users\MICHAEL\documents\visual studio 2012\Projects\Test\Debug\Test.exe : fatal error LNK1120: 7 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've set the 'VC++ Directories include' to my include directory of the downloaded binaries

and the 'Library Directories' to the lib-msvc110 directory which contains glfw3.dll, glfw3.lib and glfw3dll.lib

and I set the 'Linker -> Input' additional dependencies to glfw3.lib and glfw3dll.lib

but I still get this error.

I googled it but I didn't found a solution. Does someone has a clue what I have to do?

Regards Helgon

from time to time i find time
3TATUK2
3TATUK2

make sure your GLFW and VS targets match (32bit+32bit or 64bit+64bit)

~Helgon
~Helgon

Thanks, thanks thanks.

Using the 32-bit binaries with target-platform 32-bit and using

glfw3.lib
opengl32.lib
as additional dependencies it works!
Great! Thanks
from time to time i find time

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.