# Compilation failed - UE4.23 preview with Chaos

**URL:** <https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483>\
**Category:** World Creation\
**Tags:** engine-compile, compilation-error, unreal-engine, question, CPP\
**Created:** [August 27, 2019, 2:15pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483 "2019-08-27T14:15:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![theRPGmaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/therpgmaster/32/1139086_2.png) [@theRPGmaster](https://forums.unrealengine.com/u/theRPGmaster)\
**Post date:** [August 27, 2019, 2:15pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/1 "2019-08-27T14:15:32Z")

</div>

Compilation error: _‘metahost.h’ not found._

I’ve been trying to [compile the preview version for 4.23](https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1641765-how-to-enable-chaos-in-4-23-preview) from source (with Chaos enabled), and this error has been persistently occurring, looks like this is a quite common issue with the `#include <metahost.h>`  
For me it was in the file **SwarmInterface.cpp** in \Engine\Source\Editor\SwarmInterface\Private\

I haven’t had any luck in solving this yet, first I redownloaded the repo and went through the setup process again, and the problem persisted.  
Then I figured it might be as easy as adding the full path to the file (for me it is installed as a part of .NET SDK v4.6.2) so I tried it. **That resulted in the following three errors** :

_E0147: declaration is incompatible with “NSwarm::FLogCategoryLogSwarmInterface NSwarm::LogSwarmInterface”_

_LNK1104 cannot open file ‘mscoree.lib’_

_MSB3075: The command “…\Build\BatchFiles\Build.bat -Target=“UE4Editor Win64 Development” -Target=“ShaderCompileWorker Win64 Development” -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command._

I have no idea how to fix this, any suggestions?

---

<div class="post-metadata">

**Author:** ![mhazani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mhazani/32/725283_2.png) [@mhazani](https://forums.unrealengine.com/u/mhazani)\
**Post date:** [September 5, 2019, 7:15am UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/2 "2019-09-05T07:15:57Z")

</div>

spent the day struggling with this (in the new, official 4.23 release branch), then found the issue: the UE4 build tool is looking for .NET SDK v4.6.1 or v.4.6.

 ![286524-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/d/0fd268d982fe81029641a040b310d562368f7cca.jpeg)

Snag one of those components (by modifying your installation of VS in the Visual Studio Installer) and you should be all set to recompile - it solved my identical issue.

---

<div class="post-metadata">

**Author:** ![Lesuge](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lesuge](https://forums.unrealengine.com/u/Lesuge)\
**Post date:** [September 5, 2019, 7:15pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/3 "2019-09-05T19:15:42Z")

</div>

can you tell me, how you exactly solved this problem? When i install the .NET SDK v4.6.1 in VS the error remains

---

<div class="post-metadata">

**Author:** ![mhazani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mhazani/32/725283_2.png) [@mhazani](https://forums.unrealengine.com/u/mhazani)\
**Post date:** [September 5, 2019, 7:30pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/4 "2019-09-05T19:30:32Z")

</div>

All I did was add the 4.6.1 SDK and the 4.6.1 targeting pack. Not sure which one solved - I also currently have the 4.6 targeting pack. (I probably have too many of those!)

---

<div class="post-metadata">

**Author:** ![theRPGmaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/therpgmaster/32/1139086_2.png) [@theRPGmaster](https://forums.unrealengine.com/u/theRPGmaster)\
**Post date:** [September 6, 2019, 4:47pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/5 "2019-09-06T16:47:55Z")

</div>

I tried that and got the same errors as before. However, I will mark your answer as correct regardless. I will be updating this thread if I manage to solve it.

---

<div class="post-metadata">

**Author:** ![Lesuge](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lesuge](https://forums.unrealengine.com/u/Lesuge)\
**Post date:** [September 7, 2019, 10:27am UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/6 "2019-09-07T10:27:06Z")

</div>

That didn’t solve my problem either.

---

<div class="post-metadata">

**Author:** ![mhazani](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mhazani/32/725283_2.png) [@mhazani](https://forums.unrealengine.com/u/mhazani)\
**Post date:** [September 7, 2019, 5:22pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/7 "2019-09-07T17:22:54Z")

</div>

not sure why it’s not working - fwiw I’ve successfully repro’d this solution on two other machines running VS2019. Good luck!

---

<div class="post-metadata">

**Author:** ![Lesuge](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lesuge](https://forums.unrealengine.com/u/Lesuge)\
**Post date:** [September 8, 2019, 2:12pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/8 "2019-09-08T14:12:15Z")

</div>

I had the same error, but with the VisualStudio 2017 version instead of 2019 it worked fine

---

<div class="post-metadata">

**Author:** ![theRPGmaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/therpgmaster/32/1139086_2.png) [@theRPGmaster](https://forums.unrealengine.com/u/theRPGmaster)\
**Post date:** [September 12, 2019, 5:10pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/9 "2019-09-12T17:10:58Z")

</div>

I tried both the 2017 and 2019 version, no change.

---

<div class="post-metadata">

**Author:** ![theRPGmaster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/therpgmaster/32/1139086_2.png) [@theRPGmaster](https://forums.unrealengine.com/u/theRPGmaster)\
**Post date:** [October 5, 2019, 8:02am UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/10 "2019-10-05T08:02:00Z")

</div>

I finally got it to compile, these are the steps:

1. Download the source code from GitHub **as a ZIP archive file** instead of using Git clone

2. Unpack the ZIP, run Setup.bat, then GenerateProjectFiles.bat

3. Open the solution (.sln) file in Visual Studio 2019

4. Right-click on the project you’re trying to build (UE4), select properties, then navigate to “VC++ Directories”

5. Find the options “Include directories” and “Library directories”, change both to “Inherit from parent or project defaults”

 ![289266-20191005104347.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/8/28874b1ff09fc1482a2abf80ac1e77d5b05fed7b.png)

1. Apply and build (rebuild to be safe)

This fixed all of my original problems, check the other answers on this thread if this does not work for you.

**TL;DR: Download the source code as ZIP instead of using Git clone, check your VC++ Directories in VS.**

---

<div class="post-metadata">

**Author:** ![DragonSlayer981](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DragonSlayer981](https://forums.unrealengine.com/u/DragonSlayer981)\
**Post date:** [August 2, 2024, 4:58pm UTC](https://forums.unrealengine.com/t/compilation-failed-ue4-23-preview-with-chaos/454483/11 "2024-08-02T16:58:09Z")

</div>

This worked for me.
