Can't package a project - missing HACD_64.lib

Hello

I ran into an issue when trying to package my project.
UnrealBuildTool reports a library missing - HACD_64.lib, and throws a linking error.
The thing is - it’s a small project, and I’m certainly not using anything UE4 doesn’t come with.

I tried disabling any plugins I’m not using, but that didn’t help.

Here’s the error log:

ildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: F:\Workspace\GhostStories\Binaries\Win64\GhostStories.exe
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Total build time: 8,02 seconds
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 8,2014691s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Windows (64-bit)): ErrorReporter.Error: ERROR: AutomationTool error: Command failed (Result:5): C:\Program Files\Epic Games\4.8\Engine\Binaries\DotNET\UnrealBuildTool.exe GhostStories Win64 Development  F:\Workspace\GhostStories\GhostStories.uproject  -noxge -rocket -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool.txt' 
MainFrameActions: Packaging (Windows (64-bit)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: Exception in AutomationTool: Command failed (Result:5): C:\Program Files\Epic Games\4.8\Engine\Binaries\DotNET\UnrealBuildTool.exe GhostStories Win64 Development  F:\Workspace\GhostStories\GhostStories.uproject  -noxge -rocket -NoHotRe
MainFrameActions: Packaging (Windows (64-bit)): loadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool.txt' 
MainFrameActions: Packaging (Windows (64-bit)): Stacktrace:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.UE4Build.BuildWithUBT(String ProjectName, String TargetName, UnrealTargetPlatform TargetPlatform, String Config, String UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InForceNonUnity, Boolean InForceUnity, Dictionary`2 PlatformEnvVars)
MainFrameActions: Packaging (Windows (64-bit)):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL)
MainFrameActions: Packaging (Windows (64-bit)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Windows (64-bit)):    at BuildCommand.Execute()
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
MainFrameActions: Packaging (Windows (64-bit)):    at AutomationTool.Program.Main()
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: Command failed (Result:5): C:\Program Files\Epic Games\4.8\Engine\Binaries\DotNET\UnrealBuildTool.exe GhostStories Win64 Development  F:\Workspace\GhostStories\GhostStories.uproject  -noxge -rocket -NoHotReloadFromIDE -ignorejunk. See 

Appreciate all the help I can get!

Cheers,

Hi ,

As far as I can tell, HACD is only needed as a dependency for UnrealEd, which should not be a part of a client build/package. What does your Games.Build.cs file look like?

If you attach your editors log, I can take a look.

/T

Hi

Thanks for a quick response.

The contents of my Games.Build.cs file:

using UnrealBuildTool;

public class GhostStories : ModuleRules
{
	public GhostStories(TargetInfo Target)
	{
      PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "Slate", "SlateCore"});
	}
}

I’m attaching the log.

Thank you so very much!
Cheers,

That build.cs looks fine, Do you happen to have any custom code modules added to the engine that may have a dependency on UnrealEd?

Something to check, Could you try a Find in Files (CTRL+Shift+F) in Visual Studio for “HACD”, include the speech marks, in your “entire solution” in *.cs files.

/

Found one - C:\Program Files\Epic Games\4.8\Engine\Source\Editor\UnrealEd\UnrealEd.Build.cs(264): “HACD”,

And I’m not using any custom code modules - I’ve just started building the project on top of the TopDown C++ sample, haven’t introduced too many changes yet.

/

Hey,
Any progress on solving this bug?
It’s been a while, and a few UE4 versions have been released since then, but the problem still persists.

Would really appreciate some help.

Cheers,

Recently I got the same problem in 4.11.

And was able to solve it:

  • Close Editor and Visual Studio
  • Open .unproject file in text editor

It has something like this:

"Modules": [
		{
			"Name": "MyProject",
			"Type": "Runtime",
			"LoadingPhase": "Default",
			"AdditionalDependencies": [
				"Engine",
				"AIModule",
				"UMGEditor",
				"UMG"
			]
		}
	],
  • Remove “UMGEditor”

  • Delete Saved and Intermediate folders

  • And open project again.