# Can't Open ws2\_32.lib

**URL:** <https://forums.unrealengine.com/t/cant-open-ws2-32-lib/404888>\
**Category:** Platform & Builds\
**Tags:** UE4-17, engine-compile, vs2015, engine-crash, unreal-engine, question\
**Created:** [September 18, 2017, 3:38pm UTC](https://forums.unrealengine.com/t/cant-open-ws2-32-lib/404888 "2017-09-18T15:38:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Treviisolion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Treviisolion](https://forums.unrealengine.com/u/Treviisolion)\
**Post date:** [September 18, 2017, 3:38pm UTC](https://forums.unrealengine.com/t/cant-open-ws2-32-lib/404888/1 "2017-09-18T15:38:09Z")

</div>

I’m having problems getting Unreal to work correctly. I am running Windows 10 and this computer has only run Windows 10. Before I installed Unreal, I had VS Community 2015. Once I installed Unreal 4.17 I saw that it was meant to work in VS 2017 so I installed VS Community 2017 with the Game Dev option that includes the Unreal Engine (I didn’t re-install Unreal at this time). After that I uninstalled VS 2015 using the default uninstaller. Later when I tried to compile the code in my projects I kept getting link errors trying to open ws2\_32.lib My computer has 4 copies of WS2\_32.lib. I tried uninstalling and reinstalling the Unreal Engine (just through the Epic Games Launcher) and I was able to open a project and work with it until I needed code then it said that I would have to do something to get the code integrated or something (sorry I can’t remember). After playing around a bit I found I still couldn’t compile my code in VS or Unreal because of the same error. I also found that Unreal despite being 4.17.1 is still using VS 2015 as default despite VS 2015 being uninstalled. I switched it to use 2017 as default and now I can’t create any new project of the type Basic Code and I can’t open my original project because it needs to rebuild because it’s using an old version of the engine. Here’s an error message for when I tried to create a new basic code project.  
Running C:/Program Files/Epic Games/UE\_4.17/Engine/Binaries/DotNET/UnrealBuildTool.exe Test3 Development Win64 -project=“C:/Users/track/Documents/Unreal Projects/Test3/Test3.uproject” -editorrecompile -progress -NoHotReloadFromIDE  
Performing full C++ include scan (building a new target)  
Creating makefile for Test3 (no existing makefile)  
@progress push 5%  
Parsing headers for Test3Editor  
Running UnrealHeaderTool “C:\Users\track\Documents\Unreal Projects\Test3\Test3.uproject” “C:\Users\track\Documents\Unreal Projects\Test3\Intermediate\Build\Win64\Test3Editor\Development\Test3Editor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed  
Reflection code generated for Test3Editor in 8.6801726 seconds  
@progress pop  
Distributing 9 actions to XGE  
--------------------Build System Warning---------------------------------------  
License is invalid:  
License information is invalid. Please try reloading your license file using the Coordinator Monitor application on the Coordinator machine, or reinstall IncrediBuild.  
This build will run in standalone mode.

* * *

--------------------Project: Default-------------------------------------------  
(0:07.62 at +0:00)  
SharedPCH.Engine.cpp  
(0:00.35 at +0:07)  
Test3.cpp  
(0:00.59 at +0:08)  
Test3GameModeBase.cpp  
(0:00.42 at +0:08)  
Test3.init.gen.cpp  
(0:00.54 at +0:09)  
Test3GameModeBase.gen.cpp  
ModuleVersionResource.rc.inl (0:00.07 at +0:09)  
PCLaunch.rc (0:00.07 at +0:09)  
UE4Editor-Test3.dll (0:00.12 at +0:09)  
LINK : fatal error LNK1181: cannot open input file ‘ws2\_32.lib’

Error executing C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe (tool returned code: 1181)  
---------------------- Done ----------------------

```
Rebuild All: 0 succeeded, 1 failed, 0 skipped

```

1 build system warning(s):

- License is invalid

ERROR: UBT ERROR: Failed to produce item: C:\Users\track\Documents\Unreal Projects\Test3\Binaries\Win64\UE4Editor-Test3.dll  
Total build time: 30.34 seconds (XGE executor: 0.00 seconds)

---

<div class="post-metadata">

**Author:** ![tyoungjr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tyoungjr](https://forums.unrealengine.com/u/tyoungjr)\
**Post date:** [November 10, 2017, 4:33pm UTC](https://forums.unrealengine.com/t/cant-open-ws2-32-lib/404888/2 "2017-11-10T16:33:59Z")

</div>

I’m getting this error too. Any luck?

---

<div class="post-metadata">

**Author:** ![tyoungjr](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@tyoungjr](https://forums.unrealengine.com/u/tyoungjr)\
**Post date:** [November 10, 2017, 4:48pm UTC](https://forums.unrealengine.com/t/cant-open-ws2-32-lib/404888/3 "2017-11-10T16:48:24Z")

</div>

Try reinstalling visual studio 2015 with all the C++ tools. This worked for me.
