Download

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

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.




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



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

I add something like this?


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

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.

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!

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.