The project could not be compiled

First time using UE4. Was following instructions on installing and got it started, but I cannot get it to start a new, empty project. I’m using Windows 10 and running VS 2017 enterprise (with everything installed). Here is the error I get:

The project could not be compiled. Would you like to open it in Visual Studio?

Running G:/Program Files (x86)/New folder/UE_4.15/Engine/Binaries/DotNET/UnrealBuildTool.exe MyProject Development Win64 -project=“C:/Users/Zeno/Documents/Unreal Projects/MyProject/MyProject.uproject” -editorrecompile -progress -NoHotReloadFromIDE
Performing full C++ include scan (building a new target)
Creating makefile for MyProject (no existing makefile)
@progress push 5%
Parsing headers for MyProjectEditor
Running UnrealHeaderTool “C:\Users\Zeno\Documents\Unreal Projects\MyProject\MyProject.uproject” “C:\Users\Zeno\Documents\Unreal Projects\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
Reflection code generated for MyProjectEditor in 4.1820449 seconds
@progress pop
Distributing 8 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:33.07 at +0:00)
PCH.MyProject.cpp
(0:00.37 at +0:33)
MyProject.cpp
(0:00.40 at +0:33)
MyProjectGameModeBase.cpp
(0:00.56 at +0:33)
MyProject.generated.cpp
ModuleVersionResource.rc.inl (0:00.09 at +0:34)
PCLaunch.rc (0:00.09 at +0:34)
UE4Editor-MyProject.dll (0:00.21 at +0:34)
LINK : fatal error LNK1181: cannot open input file ‘ws2_32.lib’

Error executing C:\Program Files (x86)\Microsoft Visual Studio\Shared\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\Zeno\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject.dll
Total build time: 42.40 seconds (XGE executor: 0.00 seconds)

same error here …
VS 2017 + Win 10 …
i installed everything that required like 8.1 sdk , 10 sdk , etc and followed the UE4 document step by step …
i can’t create any C++ Project but i have no problem creating Blueprints based projects …
:expressionless:

Same for me. I get a different error now though. I’ve gotten past the initial UBT error and now get
ERROR: No 32-bit compiler toolchain found in G:\Program Files (x86)\Microsoft Visual Studio\VC\bin\cl.exe

I can’t find anywhere that has a resolution either. I’ve tried the repair tool for both 2017 enterprise as well as 2015 community. Tried uninstalling all three (both VS2015&17 as well as Unreal)and editing the registry entries, then re-installing just 2015 and unreal and get the same error as above. No idea why it won’t work! HELP

With the system I have and all the power and memory, there’s no reason I shouldn’t be able to get these two to talk to each other and go through the course!

A few things to try:

  1. Verify you selected the C++ Toolchain when installing VS2015/VS2017. If you installed things correctly you should see “Program Files (x86)/MicrosoftVisualStudio 14.0 (15.0 for 2017 I believe)/VC/bin” and it should have lots of various binaries like cl.exe, etc.
  2. One thing UHT is complaining about is your Incredibuild license is invalid, this shouldn’t cause any issues (it’ll just run in solo mode), but consider uninstalling Incredibuild if you don’t plan to use it just to reduce noise.
  3. Verify you have Environment variables that point to the appropriate tools directory. E.g. if you have VS2015 installed you should have an environment variable called “VS140COMNTOOLS” which points to “C:\Program Files(x86)\Microsoft Visual Studio 14.0\Common7\Tools” or where ever you installed VS.

9/10 times when people have issues like this, it’s forgetting to install the Toolchain when they went through the install process. You HAVE to manually select it, it’s not a default option.

Thanks for the response @ExtraLifeMatt. I actually needed to uninstall VS 2017 and 2015 and download Microsoft’s VS wipe tool and have it remove all traces of VS, then re-install VS 2017 enterprise. Works just fine now!

my problem is fixed … i uninstalled VS 2017 , then used VS total Unistaller

and cleaned up every thing using that and installed VS again … everything is fine …

I think you had installed the IncrediBuild just like me and did not regist it. To slove this problem you just need to unload the IncrediBuild or regist it.