# (SOLVED) 'HeadMountedDisplayTypes.generated.h': No such file or directory

**URL:** <https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [May 15, 2020, 6:21pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696 "2020-05-15T18:21:18Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Walabulu4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Walabulu4](https://forums.unrealengine.com/u/Walabulu4)\
**Post date:** [May 15, 2020, 6:21pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/1 "2020-05-15T18:21:18Z")

</div>

I am trying to build a VR game, we have some c++ code that requires using the headmountedDisplayfunctionlibrary.h . If I include that I get this error and can not use any of its methods.

```auto

UATHelper: Packaging (Windows (64-bit)): ExternalAppLoader.cpp (0:01.01 at +0:00)
UATHelper: Packaging (Windows (64-bit)): d:\epiclaunchergames\ue_4.23\engine\source\runtime\headmounteddisplay\public\HeadMountedDisplayTypes.h(9): fatal error C1083: Cannot open include file: 'HeadMountedDisplayTypes.generated.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):
UATHelper: Packaging (Windows (64-bit)): Error executing D:\EpiclauncherGames\UE_4.23\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)
UATHelper: Packaging (Windows (64-bit)): ExternalAppLoader.gen.cpp (0:00.95 at +0:01)
UATHelper: Packaging (Windows (64-bit)): d:\epiclaunchergames\ue_4.23\engine\source\runtime\headmounteddisplay\public\HeadMountedDisplayTypes.h(9): fatal error C1083: Cannot open include file: 'HeadMountedDisplayTypes.generated.h': No such file or directory
UATHelper: Packaging (Windows (64-bit)):
UATHelper: Packaging (Windows (64-bit)): Error executing D:\EpiclauncherGames\UE_4.23\Engine\Build\Windows\cl-filter\cl-filter.exe (tool returned code: 2)
UATHelper: Packaging (Windows (64-bit)): ---------------------- Done ----------------------
UATHelper: Packaging (Windows (64-bit)):
UATHelper: Packaging (Windows (64-bit)): Rebuild All: 0 succeeded, 1 failed, 0 skipped

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_82dfa2f11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_82dfa2f11](https://forums.unrealengine.com/u/anonymous_user_82dfa2f11)\
**Post date:** [May 15, 2020, 6:48pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/2 "2020-05-15T18:48:49Z")

</div>

Do you have “HeadMountedDisplay” as one of the modules in your Build.cs file?

---

<div class="post-metadata">

**Author:** ![Walabulu4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Walabulu4](https://forums.unrealengine.com/u/Walabulu4)\
**Post date:** [May 15, 2020, 6:53pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/3 "2020-05-15T18:53:08Z")

</div>

I add something like this?

```auto

PrivateDependencyModuleNames.AddRange(new string] {"HeadMountedDisplay"});

```

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_82dfa2f11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_82dfa2f11](https://forums.unrealengine.com/u/anonymous_user_82dfa2f11)\
**Post date:** [May 15, 2020, 6:58pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/4 "2020-05-15T18:58:38Z")

</div>

Yeah. I would assume there are already a few modules listed in both Public and Private module dependencies. You can simply add “HeadMountedDisplay” to an existing list.

---

<div class="post-metadata">

**Author:** ![Walabulu4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Walabulu4](https://forums.unrealengine.com/u/Walabulu4)\
**Post date:** [May 15, 2020, 8:07pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/5 "2020-05-15T20:07:03Z")

</div>

Ok that totally worked! thank you! I was only adding it in the privatedependencymodulenames but once I did it in the public one as well it worked. thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_82dfa2f11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_82dfa2f11](https://forums.unrealengine.com/u/anonymous_user_82dfa2f11)\
**Post date:** [May 15, 2020, 8:11pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/6 "2020-05-15T20:11:38Z")

</div>

Not a problem. Glad it worked. Yeah, usually when I run into build issues using UE4 “stuff,” I always remind myself: Does it belong to a module that you don’t have in your Build.cs file? And I end up looking it up in the UE4 docs, finding the module name, adding it in, and all is well with the world once again. This won’t be the last time you’ll run into this. Best of luck.

---

<div class="post-metadata">

**Author:** ![PRESSURE2000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PRESSURE2000](https://forums.unrealengine.com/u/PRESSURE2000)\
**Post date:** [November 16, 2023, 2:10am UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/7 "2023-11-16T02:10:23Z")

</div>

what do you mean add it to an existing list? what list? where? I have this issue

---

<div class="post-metadata">

**Author:** ![grabthar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grabthar](https://forums.unrealengine.com/u/grabthar)\
**Post date:** [January 17, 2024, 5:50pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/8 "2024-01-17T17:50:30Z")

</div>

Hello, the list is the module list. The file to edit is:

> “YourProject.Build.cs”

Your issue is maybe different on 5.3 **“HeadMountedDisplay”** got renamed to **“XRBase”**

---

<div class="post-metadata">

**Author:** ![YonaTef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YonaTef](https://forums.unrealengine.com/u/YonaTef)\
**Post date:** [January 17, 2024, 5:51pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/9 "2024-01-17T17:51:57Z")

</div>

In my Unreal 5.3 plugin build.cs file I have added the “HeadMountedDisplay” module like this:

```auto
 PublicDependencyModuleNames.AddRange( new string[]{"Core", "HeadMountedDisplay"});

PrivateDependencyModuleNames.AddRange(new string[{CoreUObject","HeadMountedDisplay"}

```

I still get the error Cannot open include file: ‘HeadMountedDisplayFunctionLibrary.h’: No such file or directory

---

<div class="post-metadata">

**Author:** ![grabthar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@grabthar](https://forums.unrealengine.com/u/grabthar)\
**Post date:** [January 17, 2024, 6:07pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/10 "2024-01-17T18:07:48Z")

</div>

Is this required in your plugin or in your project? In 5.3 you should use “XRBase”

---

<div class="post-metadata">

**Author:** ![YonaTef](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YonaTef](https://forums.unrealengine.com/u/YonaTef)\
**Post date:** [January 18, 2024, 10:31am UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/11 "2024-01-18T10:31:32Z")

</div>

> [@grabthar](#):
>
> XRBase

It was required in my plugin and Thank you very much “XRBase” is the solution.

---

<div class="post-metadata">

**Author:** ![KhorneHerald](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KhorneHerald](https://forums.unrealengine.com/u/KhorneHerald)\
**Post date:** [March 17, 2024, 9:56pm UTC](https://forums.unrealengine.com/t/solved-headmounteddisplaytypes-generated-h-no-such-file-or-directory/143696/12 "2024-03-17T21:56:49Z")

</div>

Hi!

I have the same issue on UE5.3.2  
i use XRBase module like this

PublicDependencyModuleNames.AddRange(new string { “Core”, “CoreUObject”, “Engine”, “InputCore”, “XRBase”});

but i still get the error Cannot open include file “HeadMountedDisplayFunctionLibrary.h”
