unreal-engine4precompiled-headerspch

Unreal Engine 4.20 build error in plugin: [Adaptive unity build] Disabling PCH for excluded files


I'm running into the following error in a plugin's code when trying to build a project after updating to Unreal 4.20:

1>[Adaptive unity build] Disabling PCH for excluded files. Set bAdaptiveUnityDisablesPCH to false in BuildConfiguration.xml to change this behavior. 
1>[Adaptive unity build] Excluded from MyUnrealPlugin unity file: MyFile.cpp

As an experiment, I disabled bAdaptiveUnityDisablesPCH as suggested by the error message, but doing so simply replaced the error above with this:

<>c.<PrintExceptionInfo>b__4_1: ==============================================================================
<>c.<PrintExceptionInfo>b__4_0: UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: E:\GameDirectory\UE4\MyGame\Plugins\MyPlugin\Intermediate\Build\Win64\UE4Editor\Development\MyPlugin\UE4Editor-MyPlugin.lib
<>c.<PrintExceptionInfo>b__4_0:                         (see ../Programs/UnrealBuildTool/Log.txt for full exception trace)
<>c.<PrintExceptionInfo>b__4_1: 
<>c.<PrintExceptionInfo>b__4_1: BuildException: UBT ERROR: Failed to produce item: E:\GameDirectory\UE4\MyGame\Plugins\MyPlugin\Intermediate\Build\Win64\UE4Editor\Development\MyPlugin\UE4Editor-MyPlugin.lib
<>c.<PrintExceptionInfo>b__4_1:    at UnrealBuildTool.ActionGraph.ExecuteActions(BuildConfiguration BuildConfiguration, List`1 ActionsToExecute, Boolean bIsRemoteCompile, String& ExecutorName, String TargetInfoForTelemetry, EHotReload HotReload) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\System\ActionGraph.cs:line 570
<>c.<PrintExceptionInfo>b__4_1:    at UnrealBuildTool.UnrealBuildTool.RunUBT(BuildConfiguration BuildConfiguration, String[] Arguments, FileReference ProjectFile, Boolean bCatchExceptions) in D:\Build\++UE4\Sync\Saved\CsTools\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.cs:line 1673
<>c.<PrintExceptionInfo>b__4_1: ==============================================================================

Any thoughts on what I should do to correct this?

Thanks so much!


Solution

  • Turned out to be a red herring - the actual error was further up in the build output, and stemmed from an error in the Windows 10 SDK that had previously been treated as a warning in the Win8 SDK. In this instance, these errors weren't meaningful to us, so disabling them corrected the problem.

    #pragma warning(disable:4668)   // x  is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
    #pragma warning(disable:4005)   // 'TEXT': macro redefinition