Default C++ Project Will Not Compile



I cannot compile any C++ project at all, and I am getting mildly infuriated. Let me know if need to supply any more information.

OS: Windows 10

Unreal Engine Version: 4.15.1

Visual Studio Version (15.1 (26403.3)): Latest 2017 with installed:

  • Desktop development with C++
  • VC++ 2017 v141 toolset (x86, x64)
  • C++ profiling tools
  • Windows 10 SDK (10.0.15063.0)
  • Visual C++ tools for CMake
  • Visual C++ ATL support
  • Windows 8.1 SDK and UCRT SDK
  • Windows 10 SDK (10.0.14393.0)
  • .NET desktop development
  • Game development with Unity
  • Game development with C++
  • Windows 10 SDK (10.0.15063.0)
  • Windows 10 SDK (10.0.14393.0)
  • Windows 8.1 SDK and UCRT SDK
  • Unreal Engine Installer

I have also tried setting the Visual Studio version to 2017 in the Unreal Editor.

I get the following error when I try to compile…

[FONT=Lucida Console]
1>------ Rebuild All started: Project: Test, Configuration: Development_Editor x64 ------
1>Cleaning TestEditor Binaries…
1>Performing full C++ include scan (building a new target)
1>Creating makefile for TestEditor (no existing makefile)
1>Performing full C++ include scan (no include cache file)
1>Parsing headers for TestEditor
1> Running UnrealHeaderTool “H:\Unreal Engine Projects\Test\Test.uproject” “H:\Unreal Engine Projects\Test\Intermediate\Build\Win64\TestEditor\Development\TestEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
1>Reflection code generated for TestEditor in 4.4346486 seconds
1>Performing 8 actions (4 in parallel)
1>[3/8] Resource PCLaunch.rc
1>[2/8] Resource ModuleVersionResource.rc.inl
1>[7/8] Link UE4Editor-Test.dll
1>[8/8] Link UE4Editor-Test.lib
1>LINK : fatal error LNK1181: cannot open input file ‘ws2_32.lib’
1> Creating library H:\Unreal Engine Projects\Test\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test.lib and object H:\Unreal Engine Projects\Test\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Test.exp
1>ERROR : UBT error : Failed to produce item: H:\Unreal Engine Projects\Test\Binaries\Win64\UE4Editor-Test.dll
1>Total build time: 59.54 seconds (Local executor: 0.00 seconds)
1>H:\Program Files\Visual Studio 2017\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(49,5): error MSB3073: The command ““H:\Program Files\Unreal Engine\UE_4.15\Engine\Build\BatchFiles\Rebuild.bat” TestEditor Win64 Development “H:\Unreal Engine Projects\Test\Test.uproject” -waitmutex” exited with code -1.
1>Done building project “Test.vcxproj” – FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Is it the case that I cannot use Visual Studio 2017 at all? Do I have to install 2015?


  • Quinn

Try using visual studio 2015.

The same error on reddit:
Looks like troubles in Visual Studio 2017 installation.

Thanks for the help, I fixed it. In case anyone is wondering I used the Visual Studio Uninstaller from Microsoft’s GitHub then repaired Visual Studio 2017. That’s it.k