Unreal Engine with NVIDIA FleX can not be built

I am trying to build Unreal Engine with NVIDIA FleX.
It worked fine until UE4.sln was generated, but an error occurs when trying to build UE4.
I will reprint Output below.

1>------ Rebuild All started: Project: DotNETUtilities, Configuration: Development Any CPU ------
1> DotNETUtilities → D:\UnrealEngine\Engine\Binaries\DotNET\DotNETUtilities.dll
2>------ Rebuild All started: Project: UnrealBuildTool, Configuration: Development Any CPU ------
2> UnrealBuildTool → D:\UnrealEngine\Engine\Binaries\DotNET\UnrealBuildTool.exe
3>------ Rebuild All started: Project: ShaderCompileWorker, Configuration: Development_Program x64 ------
3> Cleaning ShaderCompileWorker Binaries…
3> Using ‘git status’ to determine working set for adaptive non-unity build.
3> While compiling D:\UnrealEngine\Engine\Intermediate\Build\BuildRules\UE4Rules.dll:
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (101,21): warning CS0618: 'UnrealBuildTool.ModuleRules.RuntimeDependencyList.Add (UnrealBuildTool. ModuleRules.RuntimeDependency) ‘is an old format:’ Constructing a RuntimeDependency object is deprecated. Call RuntimeDependencies.Add () with the path to the file to stage. ’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (119,21): warning CS0618: 'UnrealBuildTool.ModuleRules.RuntimeDependencyList.Add (UnrealBuildTool. ModuleRules.RuntimeDependency) ‘is an old format:’ Constructing a RuntimeDependency object is deprecated. Call RuntimeDependencies.Add () with the path to the file to stage. ’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (185,21): warning CS0618: 'UnrealBuildTool.ModuleRules.RuntimeDependencyList.Add (UnrealBuildTool. ModuleRules.RuntimeDependency) ‘is an old format:’ Constructing a RuntimeDependency object is deprecated. Call RuntimeDependencies.Add () with the path to the file to stage. ’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (205,21): warning CS0618: 'UnrealBuildTool.ModuleRules.RuntimeDependencyList.Add (UnrealBuildTool. ModuleRules.RuntimeDependency) ‘is an old format:’ Constructing a RuntimeDependency object is deprecated. Call RuntimeDependencies.Add () with the path to the file to stage. ’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (14,13): warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is an old format : ‘The’ Definitions ‘property has been deprecated. Please use’ PublicDefinitions ‘instead.’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (18,9): warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is an old format : ‘The’ Definitions ‘property has been deprecated. Please use’ PublicDefinitions ‘instead.’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (22,13): warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is an old format : ‘The’ Definitions ‘property has been deprecated. Please use’ PublicDefinitions ‘instead.’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (23,13): warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is an old format : ‘The’ Definitions ‘property has been deprecated. Please use’ PublicDefinitions ‘instead.’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (28,13): warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is an old format : ‘The’ Definitions ‘property has been deprecated. Please use’ PublicDefinitions ‘instead.’
3> UnrealBuildTool: warning: d: \ UnrealEngine \ Engine \ Plugins \ GameWorks \ Flex \ Source \ ThirdParty \ FlexLibrary \ FlexLibrary.Build.cs (29,13): warning CS0618: ‘UnrealBuildTool.ModuleRules.Definitions’ is an old format : ‘The’ Definitions ‘property has been deprecated. Please use’ PublicDefinitions ‘instead.’
3> Using ‘git status’ to determine working set for adaptive non-unity build.
3> Using ‘git status’ to determine working set for adaptive non-unity build.
3> Creating makefile for ShaderCompileWorker (no existing makefile)
3> Performing full C++ include scan (no include cache file)
3> Building UnrealHeaderTool…
3> Using ‘git status’ to determine working set for adaptive non-unity build.
3> Creating makefile for UnrealHeaderTool (no existing makefile)
3> Performing full C++ include scan (no include cache file)
3> [1/37] Resource ModuleVersionResource.rc.inl
3> [2/37] Resource PCLaunch.rc
3> [3/37] Compile Module.UnrealHeaderTool.cpp
3> [4/37] Resource PCLaunch.rc
3> DBSBUILD: error(a69d7a8a-5be3-4c65-91b3-59bdd8d5500e,7): could not get full path for tool -q
3>ERROR : UBT error : Failed to produce item: D:\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\UnrealHeaderTool-Core.lib
3> Total build time: 6.75 seconds (SNDBS executor: 0.00 seconds)
3>EXEC : error : UnrealHeaderTool failed for target ‘ShaderCompileWorker’ (platform: Win64, module info: D:\UnrealEngine\Engine\Intermediate\Build\Win64\ShaderCompileWorker\Development\ShaderCompileWorker.uhtmanifest, exit code: OtherCompilationError (5)).
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command “…..\Build\BatchFiles\Rebuild.bat ShaderCompileWorker Win64 Development -WaitMutex -FromMsBuild” exited with code -1.
4>------ Rebuild All started: Project: UE4, Configuration: Development_Editor x64 ------
4> Cleaning UE4Editor Binaries…
4> Using ‘git status’ to determine working set for adaptive non-unity build.
4> Using ‘git status’ to determine working set for adaptive non-unity build.
4> Using ‘git status’ to determine working set for adaptive non-unity build.
4> Creating makefile for UE4Editor (no existing makefile)
4> Performing full C++ include scan (no include cache file)
4> Building UnrealHeaderTool…
4> Using ‘git status’ to determine working set for adaptive non-unity build.
4> Creating makefile for UnrealHeaderTool (no existing makefile)
4> Performing full C++ include scan (no include cache file)
4> [1/37] Resource ModuleVersionResource.rc.inl
4> [2/37] Resource PCLaunch.rc
4> [3/37] Compile Module.UnrealHeaderTool.cpp
4> [4/37] Resource PCLaunch.rc
4> DBSBUILD: error(a69d7a8a-5be3-4c65-91b3-59bdd8d5500e,8): could not get full path for tool -q
4>ERROR : UBT error : Failed to produce item: D:\UnrealEngine\Engine\Intermediate\Build\Win64\UnrealHeaderTool\Development\UnrealHeaderTool-Core.lib
4> Total build time: 2.43 seconds (SNDBS executor: 0.00 seconds)
4>EXEC : error : UnrealHeaderTool failed for target ‘UE4Editor’ (platform: Win64, module info: D:\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor.uhtmanifest, exit code: OtherCompilationError (5)).
4>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command “…..\Build\BatchFiles\Rebuild.bat UE4Editor Win64 Development -WaitMutex -FromMsBuild” exited with code -1.
========== Rebuild All: 2 succeeded, 2 failed, 0 skipped ==========

I examined similar posts in the past and tried the following, but it did not solve it.

  1. Run Visual Studio as an administrator
  2. Add ‘Arguments.Add (“/ Zc: twoPhase-”);’ to VCToolChain.cs
  3. Add ‘interface IUnknown’ to combaseapi.h
  4. Add “GameplayTask” to PublicDependencyModuleNames.AddRange of ShaderCompileWorker.Build.cs
  5. Verify account with user information in Windows setting

I have tried both versions of Visual Studio 2015 and 2017.

Please let me know if there are other possible solutions.