Download

[SOLVED] fatal error C1083: Unable to open include file

Since switching to 4.17 I have been unable to use my regular build script that has worked flawlessly so far. I must stress that I have issues with building as opposed to starting the editor etc…

When trying to build, I am encountering the following issue;
"
UnrealBuildTool: C:\Users\Altrue\Documents\UnrealEngine\Engine\Source\Runtime\Engine\Classes\Kismet/HeadMountedDisplayFunctionLibrary.h(7): warning: This file has been moved to HeadMountedDisplay/Public/HeadMountedDisplayFunctionLibrary.h. Some types were moved to HeadMountedDisplay/Public/HeadMountedDisplayTypes.h. Replace all #include “Kismet\HeadMountedDisplayFunctionLibrary.h” with: #include “HeadMountedDisplayFunctionLibrary.h” or #include “HeadMountedDisplayTypes.h”.
UnrealBuildTool: c:\users\altrue\documents\unrealengine\engine\source\runtime\headmounteddisplay\public\HeadMountedDisplayTypes.h(9): fatal error C1083: Unable to open include file: 'HeadMountedDisplayTypes.generated.h’�: No such file or directory
UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\Altrue\Documents\Unreal Projects\ProjectName\Binaries\Win64\ProjectName.pdb

…]

Program.Main: AutomationTool exiting with ExitCode=5 (5)
BUILD FAILED

EXECUTION TIME: 0:00:32,07

"
(That execution time bit is from my script but I left it there because it shows how fast it is failing. Though the first build attempt took 2min28sec to fail.)

I have tried deleting the Headmounteddisplay folders in intermediate and binary, then generating the engine’s project files and building the engine again, to no avail.

My project is not a VR project, I’m not even interested in this headmounteddisplaytypes class, nor did I modify it in any way.

Solved it!

Turns out, after removing the Kismet\HeadMountedDisplayFunctionLibrary.h completely, the error message on build changed to point to one of my own game files. I had a default character.cpp file one or two engine versions old, with an include to this Kismet\HeadMountedDisplayFunctionLibrary.h that had been left by mistake.

The #include in this file to grab the code from the proper (new) location clearly doesn’t work, because the build was looking for the generated.h at the wrong location. I would suggest changing the deprecation warning to an error on this one :), as this Kismet library file clearly isn’t working anymore.