NB: Answerhub thread here - but no Epic response so far and the posted solutions from others don't work. https://answers.unrealengine.com/que...cannot-op.html


I've recently switched one of my projects over to the IWYU system, by adding the following to my project.build.cs and all project-plugins:

        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
        bEnforceIWYU = true;
My project is quite plugin heavy. I share code across multiple projects. Here's what the module dependencies look like in my project build.cs:

 PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
        bEnforceIWYU = true;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OnlineSubSystem", "OnlineSubsystemUtils", "MoviePlayer", "GameplayTasks", "AIModule", "AssetRegistry", "MovieScene", "LevelSequence", "RHI", "RenderCore", "Navmesh", "HTTP", "ImageWrapper", "Slate", "SlateCore", "UMG" });

        // Custom Plugin Includes
        PublicDependencyModuleNames.AddRange(new string[] { "ST_Core"
            , "ST_Assertions"
            , "ST_OnlineCore"
            , "ST_OnlineFramework"
            , "ST_TeamFramework"
            , "ST_FX"
            , "ST_SoundVisualizer"
            , "ST_Spawn"
            , "ST_NetworkMovement"
            , "ST_UICore"
            , "ST_Scalability"
            , "ST_VirtualCursor"
            , "ST_SaveData"
            , "ST_PromptTutorial"});

        if (ROTargetRules.Type == TargetRules.TargetType.Editor)

        if (Target.Platform == UnrealTargetPlatform.PS4)
        else if (Target.Platform == UnrealTargetPlatform.XboxOne)
Now - this all builds just fine for the Editor, but when I try to package I have a missing lib "libfbxsdk-md.lib" - which makes no sense because that's part of the editor. This has ONLY started occurring since I specified IWYU. The problem is, when I remove IWYU, the problem doesn't go away. I've tried all the usual debugging steps, but I can't get any extra information.

I have been totally unable to find out where this is coming from or what causes it - so looking for suggestions here. I've looked in all the logs, and this is all the information I get which is pretty useless. I've got no idea why or where the dependency is coming from.

UATHelper: Packaging (Windows (64-bit)): [243/243] Link ECGame-Win64-DebugGame.exe
UATHelper: Packaging (Windows (64-bit)): LINK : fatal error LNK1181: cannot open input file 'libfbxsdk-md.lib'
UATHelper: Packaging (Windows (64-bit)): ERROR: UBT ERROR: Failed to produce item: E:\P4\JBaxter_Work\Eclipse\Eclipse_Steam\ECGame\Binaries\Win64\ECGame-Win64-DebugGame.exe
UATHelper: Packaging (Windows (64-bit)): Total build time: 121.53 seconds (Local executor: 0.00 seconds)
UATHelper: Packaging (Windows (64-bit)): Took 121.6725937s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): ERROR: Command failed (Result:5): C:\UE4_Builds\UE4_Eclipse\Engine\Binaries\DotNET\UnrealBuildTool.exe ECGame Win64 DebugGame -Project=E:\P4\JBaxter_Work\Eclipse\Eclipse_Steam\ECGame\ECGame.uproject E:\P4\JBaxter_Work\Eclipse\Eclipse_Steam\ECGame\ECGame.uproject -NoUBTMakefiles -remoteini="E:\P4\JBaxter_Work\Eclipse
\Eclipse_Steam\ECGame" -skipdeploy -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2018.07.05-20.46.40.txt'
UATHelper: Packaging (Windows (64-bit)): (see C:\Users\James\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+UE4_Builds+UE4_Eclipse\UAT_Log.txt for full exception trace)
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error