# Getting errors LNK2001 in Visual Studio 2017

**URL:** https://discourse.glfw.org/t/getting-errors-lnk2001-in-visual-studio-2017/1359
**Category:** support
**Created:** [July 18, 2019, 2:39pm UTC](https://discourse.glfw.org/t/getting-errors-lnk2001-in-visual-studio-2017/1359 "2019-07-18T14:39:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![pvorisek25](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@pvorisek25](https://discourse.glfw.org/u/pvorisek25)
#### Post date: [July 18, 2019, 2:39pm UTC](https://discourse.glfw.org/t/getting-errors-lnk2001-in-visual-studio-2017/1359/1 "2019-07-18T14:39:44Z")

</div>

Hi, I tried to use GLFW and GLEW static libraries for my testing aplication. Everything worked fine but when I tried to add SLikeNet library GLFW or GLEW did not work itself. So I tried remove SLikeNet lib and set compiling settings to state before including SLikeNet but I am still getting these errors:

![errors](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/596f68e4f0dfa3b5d6508e9933ad9b33afd763b1.png)

I also looked to some other topics about my problem but they were about x86 and x64 architecture. So I checked all GLEW and GLFW if they are x86 and if I am compiling for x86 but I had everything correct. Does anyone know what I am missing?

Thank you for your answers.

And sorry for my bad English skills.

---

<div class="post-metadata">

### Author: ![mmozeiko](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/mmozeiko/32/29_2.png) [@mmozeiko](https://discourse.glfw.org/u/mmozeiko)
#### Post date: [July 18, 2019, 11:20pm UTC](https://discourse.glfw.org/t/getting-errors-lnk2001-in-visual-studio-2017/1359/2 "2019-07-18T23:20:55Z")

</div>

You need to link to other Windows libraries if you use GLFW as static library - gdi32.lib and user32.lib. Either add them in project properties for linker “Additional Dependencies” setting.  
Or put `#pragma comment (lib, "gdi32.lib")` in your .c/.cpp source.

---

<div class="post-metadata">

### Author: ![pvorisek25](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@pvorisek25](https://discourse.glfw.org/u/pvorisek25)
#### Post date: [July 19, 2019, 7:44am UTC](https://discourse.glfw.org/t/getting-errors-lnk2001-in-visual-studio-2017/1359/3 "2019-07-19T07:44:24Z")

</div>

mmozeiko thank you for answer. It did work so I have only 7 errors now.

 ![errors1](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/1962fd5e55f7c7e550f379f099f3cc9602b7ec2d.png)

I also found that I deleted %(AdditionalDependencies) from “Additional Dependencies” in linek tab.

---

<div class="post-metadata">

### Author: ![pvorisek25](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@pvorisek25](https://discourse.glfw.org/u/pvorisek25)
#### Post date: [July 20, 2019, 6:49am UTC](https://discourse.glfw.org/t/getting-errors-lnk2001-in-visual-studio-2017/1359/4 "2019-07-20T06:49:49Z")

</div>

All errors solved! I did not set multi-threading DLL or multi-threading DLL Debug when building with debug configuration in project settings.
