Help with compiling Unreal engine

Wanted to use unreal without the epic games launcher
I have been getting these errors every time I try to build the app

Severity	Code	Description	Project	File	Line	Suppression State
Error	C1083	Cannot open include file: 'metahost.h': No such file or directory	UE4	M:\Documents\GitHub\UnrealEngine\UnrealEngine\Engine\Source\Editor\SwarmInterface\Private\SwarmInterface.cpp	21	
Error	MSB3075	The command "..\..\Build\BatchFiles\Build.bat -Target="ShaderCompileWorker Win64 Development" -Target="UE4Editor Win64 Development" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.	UE4	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets	44	

I tried following the answers to these questions

this was a good solution

Well, the links you provided deal with windows.h, which is the Windows API, which is present on all Windows systems by default i think. Your problem with metahost.h is a different thing. According to this link, metahost.h is supposed to be inside .NET SDK, so you have to find, install and select the right one.

The links I used were trying to solve the

Error	MSB3075	The command "..\..\Build\BatchFiles\Build.bat -Target="ShaderCompileWorker Win64 Development" -Target="UE4Editor Win64 Development" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.	UE4	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets	44	

I followed that link for metahost.h, but I am not getting the matching C/C++ tabs in the property pages

image
what they say should be the tabs


what I am getting

You’re def missing somethitg tho. Can’t you do this in linux? Would seem easier.

I could, but my Linux drive doesn’t have enough space to install and make projects. Also my fedora install has some funky things with finding the directory for my mass storage hard drive

Last time I checked it was easier to build on windows anyways.

What version of UE are u on?

https://issues.unrealengine.com/issue/UE-42205

https://answers.unrealengine.com/questions/565244/vs2015-compiler-error-failed-to-produce-item-lib.html


Try doing full rebuild. Also try to build from editor not VS.

any other suggested editors?

i mean unreal editor, not code editor. vs has good integration with ue, so no.

the ue editor has a “Compile” button, use that.

hold on lmao, realised u’re building it

1 Like

try this:

matched everything but the last step of changing the property pages

I think I got myself confused lol.

I think there’s a regression in UE4 where they always give you that error code 5 error on any error. Can you verify that you have that missing header? That might be the real problem.

what am I looking for? Is the header inside of the MakeFile.targets?

Error C1083 Cannot open include file: 'metahost.h': No such file or directory

This one:

‘metahost.h’:

It seems to be a problem with WIndows/VS libs.

You might upgrade your Visual Studio Project to VS 2017 and you might get errors like:

1>c:\memspect\vsassert\pch.h(20): fatal error C1083: Cannot open include file: 'metahost.h': No such file or directory

Apparently it used to be part of the Windows 8.1 SDK, but is now in the .Net SDK. Seems like a reasonable change, but now I understand why it breaks backward compatibility.

Check to see if you have a version of the .Net SDK with metahost.h installed. If not, run the Visual Studio installer to install a .Net Framework SDK version.

- https://blogs.msdn.microsoft.com/calvin_hsia/2017/02/13/cannot-open-include-file-metahost-h-no-such-file-or-directory/


What else could I be missing?

UE is using a build script and is not tied to Visual Studio build system. You need to track down where to add the include directories in the scripts themselves. It’s in the error message …/…/Build/BatchFiles/Build.bat

Because it’s not on Visual Studio build system, you don’t get all the tabs.

did you by chance do this?

https://answers.unrealengine.com/questions/810057/cant-compile-from-github-source-metahosth-missing.html

read the comments and the extra answers, there seem to be multiple related issues on different ue4 versions.

lol what a cluster fuck tho.

1 Like

Following the instructions in the link worked and I was able to finish compiling the code.

Thanks for the help.

Is there any way for me to make a shortcut or something that will let me launch unreal?

1 Like

Glad it worked out.

Now that is beyond me, I don’t remember windows well enough :smiley:

1 Like