UnrealBuildTool: LINK : fatal error LNK1181: cannot open input file 'libfbxsdk-md.lib'

I’m trying to package my game in UE4.17 after upgrading from 4.15 but am getting an error finding libfxdsk-md.lib.

I can find libfbxdsk.lib but there is no -md variant. I upgraded VS2017 to the latest update last night and verified that I have the latest windows 10 SDK installed. Still no luck. At one point awhile ago I had packaged with 4.15, but I am not sure if it was still able to be packaged when I did the upgrade.

I tried renaming libfbxsdk.lib to libfbxsdk-md.lib. Now the error is

LINK : fatal error LNK1181: cannot open input file 'C:\Program Files\Epic Games\UE_4.17\Engine\Binaries\Win64\UE4-UnrealEd.lib'

I’m gonna try an Engine verification and report back here.

Edit: no deal. It’s still asking for C:\Program Files\Epic Games\UE_4.17\Engine\Binaries\Win64\UE4-UnrealEd.lib

Edit 2: I reproduced the same problem in another project. Both converted from 4.16.3. Clean projects (either BP or Code) build fine in Development and Shipping modes.

Do you have some plugin using the new IWYU pattern? I’m starting to think that’s the culprit. Because the modules I used are used by other engine plugins or even the Substance plugin, but I found none using IWYU.

Edit: I converted one of my other plugins that used the IWYU pattern to 4.17 and it packaged ok. I’m starting to think the problems have to do with using the UnrealEd module in a IWYU plugin in 4.17.

Edit 2: yup. Usage of the UnrealEd module in the plugin’s Build.cs file seems to be broken if its module is set to be of any type other than Editor. I just added it to my PublicDependencyModules on a previously packageable plugin (didn’t even include any header from it in code) and the plugin compiled but I wasn’t able to package the game, getting the the same error as OP.

@RVillani
It appears that my problem was in the .uproject I had accrued some references to things that I didn’t need (no clue where/when they showed up). I removed them one by one until it went away. The culprit appears to have been the UMGEditor line in my .uproject?

@Sessional Yeah, probably. Editor related modules seem to be the problem.

This helped me:

https://forums.unrealengine.com/development-discussion/c-gameplay-programming/28514-unrealed-dependency-causes-package-failure

Basically in the Game.Build.cs file you need to conditionally add the UnrealEd dependency depending whether you’re building with editor or not.

if (UEBuildConfiguration.bBuildEditor)
{
    PublicDependencyModuleNames.AddRange(
        new string[] {
            "UnrealEd",
        }
    );
}

Situation Overview:
I got the same error in 4.18.3 in a fresh project. The project uses 1 plugin, containing an editor module and a runtime module. The editor module uses the runtime module, no binding the other way around. The editor module is the only place which uses “UnrealEd” in PrivateDependencyModuleNames, which turned out not to be the issue.

Inside the .Target.cs and Editor.Target.cs are only: ExtraModuleNames.AddRange(new string[] {"PluginName"} ); Despite information suggesting the modules need to be included here, with the editor module in if (Target.Type == TargetType.Editor), this was not required.

This seems to be related to the Include What You Use principle, since somewhere I picked up to include “UMGEditor” in the .uproject and in the main Build.cs under PublicDependencyModuleNames “UMG”.

Potential Solution:
Having removed these UMG dependencies, the project now packaged properly for me.

Having this problem now and none of the answer seem to solve it.

I’ve removed the dependency on the UMG module, and UnrealEd is already included when building for Editor. I’m also using the following modules:

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

So - what gives? I just switched this project over to IWYU. Really regretting it…

@Sessional - just to clarify, are you saying add it as a Public Dependency not Remove it?

EDIT: Just tried with UMG as a ■■■■■ dependency, still no joy.

@TheJamsh It was a mix of what was in the .uproject and what was included as a public dependency.

I see you don’t have UMG as a public dependency, can you try that and hit build again?

Can you post a snippet of what your .uproject has for dependencies? I had things in my .uproject that shouldn’t have been there too (such as UMGEditor).

For all my stuff I need “UMG” as a PublicDependencyModuleName so I can use UUserWidget in my C++ stuff.

@Sessional

I had UMG as a Private Dependency but moved it to Public, no dice I’m afraid.

There are a few plugins enabled/disabled in my .uproject file - but these are the only modules:

	"Modules": [
		{
			"Name": "ECGame",
			"Type": "Runtime",
			"LoadingPhase": "Default",
			"AdditionalDependencies": [
				"Engine"
			]
		}
	],

Right y’all, I’m posing this thread as an update.

I’ve since moved my project to 4.20 to see if the issue still occurred. It did, but the warning was different.

It turns out, trying to include any module that’s editor-only (though it’s hard to know which modules ARE editor-only) in a plugin, and not wrapping that module in an editor-only check will cause your build to fail.

Unfortunately, UBT offers absolutely no useful logging or indication so I went into this pretty much blind. I’d really like UBT logging to be improved in this area…

Hey! I am in the very same situation, with an Editor Modue, a Runtime Module and the “UnrealED” mentioned only in the editor one in PrivateDependencyModuleNames. The plugin in question is PerceptionNeuron, and what’s more, I get problems only with one particular project (Proteus). If I try to build it in a fresh project it works.
Unfortunately, I cannot find any Editor.Target.cs anywhere, my .Target.cs is like this `public class ProteusNewTarget : TargetRules
{
public ProteusNewTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;

	ExtraModuleNames.Add("UE4Game");
}

}
`
my main .uproject has no modules, only plugins and I cannot find any Build.cs. No UMG in what I have found. Could you help?