Getting errors LNK2001 in Visual Studio 2017

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:


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.

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.

1 Like

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

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

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