New C++ Project fails to compile using UE 4.15 and VS 2017 Community Edition - LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'
Running Win10 64 bit
I downloaded and installed VS2017 CE and install options Desktop Development with C++ .NET Desktop Development Games Development with C++ Unreal Installer
I then run Epic Games installer, and install UE4.
I then create new Basic Code C++ project, and it fails with the following error.
Running C:/Program Files/Epic Games/UE_4.15/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject1 Development Win64 -project="C:/Users/username/Documents/Unreal Projects/MyProject1/MyProject1.uproject" -editorrecompile -progress -NoHotReloadFromIDE Performing full C++ include scan (building a new target) Creating makefile for MyProject1 (no existing makefile) @progress push 5% Parsing headers for MyProject1Editor Running UnrealHeaderTool "C:\Users\username\Documents\Unreal Projects\MyProject1\MyProject1.uproject" "C:\Users\username\Documents\Unreal Projects\MyProject1\Intermediate\Build\Win64\MyProject1Editor\Development\MyProject1Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed Reflection code generated for MyProject1Editor in 3.82364 seconds @progress pop Performing 8 actions (4 in parallel) [2/8] Resource ModuleVersionResource.rc.inl [3/8] Resource PCLaunch.rc PCH.MyProject1.cpp MyProject1.cpp MyProject1GameModeBase.cpp MyProject1.generated.cpp [7/8] Link UE4Editor-MyProject1.dll [8/8] Link UE4Editor-MyProject1.lib LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib' Creating library C:\Users\username\Documents\Unreal Projects\MyProject1\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyProject1.lib and object C:\Users\username\Documents\Unreal Projects\MyProject1\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyProject1.exp ERROR: UBT ERROR: Failed to produce item: C:\Users\username\Documents\Unreal Projects\MyProject1\Binaries\Win64\UE4Editor-MyProject1.dll Total build time: 42.00 seconds (Local executor: 0.00 seconds)
asked May 08 '17 at 05:04 PM in Installation & Setup
thanks guys - out of desperation I ran this https://github.com/Microsoft/VisualStudioUninstaller/releases (it removed a bunch of stuff) and then repaired my VS2017 CE and it fixed it. I suspect old 2013 or 2015 installs confused things. I am working 100% now.
answered May 09 '17 at 07:50 PM
Hello anonymoussalt & Straskal,
I've seen LNK 1181 errors before but never with this particular file. From what I've looked up, it seems related to Windows SDK installations, as with most LNK errors. If you have the Windows 8.1 and/or Windows 10 SDK installed (These are separate SDKs, not updates for one another), please try uninstalling, restarting your computer, and then reinstalling the SDKs. For Straskal, since you're on Windows 7, you should only need the Windows 8.1 SDK.
For my own installation, the WS2_32.lib file is located in the 8.1 SDK so I would focus on that first, and then worry about the Windows 10 SDK if reinstalling 8.1 doesn't help. I am on Windows 7 however so it may be different for you, anonymoussalt.
Please give those options a try and let me know the results.
answered May 09 '17 at 07:45 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here