x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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)

Product Version: UE 4.15
Tags:
more ▼

asked May 08 '17 at 05:04 PM in Installation & Setup

avatar image

HT Aidn
216 3 10 36

avatar image Straskal May 09 '17 at 03:31 PM

I am also having this problem with windows 7. I've installed the c++ desktop workload and the game dev workload. I'd like to see this get answered as well:)

avatar image Straskal May 09 '17 at 03:31 PM

Sorry. Meant to add this as a comment :0

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered May 09 '17 at 07:50 PM

avatar image

HT Aidn
216 3 10 36

avatar image Howie Dec 22 '17 at 10:28 PM

Woo, thank you this worked for me too!

avatar image Dakro Feb 06 '18 at 09:29 AM

That's the real MVP up there! :D This saved my life thanks mate!

avatar image ZeroBytes Mar 14 '18 at 06:30 PM

Can confirm this works as of 3/14/2018. Thanks a bunch!

avatar image Korrax Apr 18 '18 at 06:42 PM

YAY, this helps me too! I have had installed visual Studio 2015 and uninstalled it, because i wanted visual studio 2017. After the "Uninstaller"-Tool i repaired the visual Studio 2017 installation and my ue4 packaging without errors! THANKS!

avatar image AAriyAA Jun 05 '18 at 11:36 PM

Thanks dude its fix my problem too.

avatar image GBMPRODS Jul 30 '18 at 08:38 PM

YES!!! Finally, been on this issue for 2 days straight. @anonymoussalt diamond geeza, mate ;)

avatar image HT Aidn Jul 31 '18 at 10:08 PM

I love this. I figured nobody would ever read my post. hahaha. makes me happy i could help!

avatar image confirmedancient Aug 25 '18 at 05:28 PM

OMG THANK YOU

avatar image Carlos Zerpa Sep 06 '18 at 06:59 PM

This was probably my last attempt trying. And it worked ! Thank you!!

avatar image Kruul Jul 20 '19 at 11:13 AM

This works when uninstalling Visual Studio 15 so you can just use newer version

Run the Uninstaller > Repair your Visual Studio 17 > Open Visual Studio from Unreal Engine version to let it rebuild as it thinks its a first time run.

Was able to build the project and run the .exe file with no hiccups.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered May 09 '17 at 07:45 PM

avatar image FriedOkra Oct 30 '18 at 07:19 PM

Bingo. On one machine, my x64 folder in the sdk had 90 files, but 465 on another. Uninstalled and resinstalled win 10 sdk 10.0..17134 and the files were restored (repair did not do this). So packaging for 64 bit now working.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question