Search code examples
dependency-managementunreal-engine4

Unreal: I get "fatal error: 'IMotionController.h' file not found" when trying to build


The IMotionController.h file is included in my external dependencies folder in Visual Studio, so I can compile my code in the Editor, but when I try to build to an application I get:

fatal error: 'IMotionController.h' file not found

Do I need to include something in my Build.cs dependencies?

Currently, just using the defaults:

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore"});

Solution

  • I had to add the HeadMountedDisplay module to the Build.cs:

     PublicDependencyModuleNames.AddRange(new string[] { "HeadMountedDisplay", "Core", "CoreUObject", "Engine", "InputCore" });