# Glfw and Visual Studio Community 2015

**URL:** <https://discourse.glfw.org/t/glfw-and-visual-studio-community-2015/169>\
**Category:** support\
**Created:** [August 7, 2015, 1:05pm UTC](https://discourse.glfw.org/t/glfw-and-visual-studio-community-2015/169 "2015-08-07T13:05:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [August 7, 2015, 1:05pm UTC](https://discourse.glfw.org/t/glfw-and-visual-studio-community-2015/169/1 "2015-08-07T13:05:11Z")

</div>

**[barfoobar](https://sourceforge.net/u/barfoobar/)** wrote on [Friday, August 07, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/c5f88829/#940f):

Hi,

I downloaded the source package and used the cmake gui to generate the build files (I used the default configuration). Then I opened the resulting files in Visual Studio Community 2015 and compiled it (no errors).

Then I included the generated files from the include folder(glfw3.h and glfw3native.h) into my project and added the library files (glfw3.lib and glfw3.dll). (Additional dependencies glfw3.lib, opengl32.lib, glu32.lib, kernel32.lib, user32.lib). Then I copied the.dll file into my system32 folder and into my build folder

I include in my source code the glfw3.h file.

Unfortunately I am getting errors when I build my source code:

> Error LNK2019 unresolved external symbol \_\_imp\_\_glfwSwapBuffers referenced in function \_main BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1  
> Error LNK1120 7 unresolved externals BonbonGame F:\Programme\TestGame\TestGame\Debug\BonbonGame.exe 1  
> Error LNK2019 unresolved external symbol \_\_imp\_\_glfwInit referenced in function \_main BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1  
> Error LNK2019 unresolved external symbol \_\_imp\_\_glfwTerminate referenced in function \_main BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1  
> Error LNK2019 unresolved external symbol \_\_imp\_\_glfwCreateWindow referenced in function \_main BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1  
> Error LNK2019 unresolved external symbol \_\_imp\_\_glfwWindowShouldClose referenced in function \_main BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1  
> Error LNK2019 unresolved external symbol \_\_imp\_\_glfwPollEvents referenced in function \_main BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1  
> Error LNK2019 unresolved external symbol \_\_imp\_\_glfwMakeContextCurrent referenced in function \_main BonbonGame F:\Programme\TestGame\TestGame\TestGame\TestGame.obj 1

Did I forget to configure something Visual Studio?

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [August 7, 2015, 1:28pm UTC](https://discourse.glfw.org/t/glfw-and-visual-studio-community-2015/169/2 "2015-08-07T13:28:05Z")

</div>

**[dougbinks](https://sourceforge.net/u/dougbinks/)** wrote on [Friday, August 07, 2015](https://sourceforge.net/p/glfw/discussion/247562/thread/c5f88829/#a44d):

See [http://www.glfw.org/docs/latest/build.html#build\_link\_win32](http://www.glfw.org/docs/latest/build.html#build_link_win32)

Normally you link to the glfw3.lib or the glfw3dll.lib with GLFW\_DLL defined (and then put the dll somewhere it an be found such as the same folder as the exe, or a system folder) - though I’m not sure what the source download cmake builds with default configuration exactly.
