Halp! Cannot open input file 'HACD_64.lib' when packaging

Hi guys.

I’m trying to package my game, and I’m having loads of trouble… I’m getting this error: (cleaned for the sake of forumers)


UnrealBuildTool: LINK : fatal error LNK1181: cannot open input file 'HACD_64.lib'
UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: D:\Unreal Projects\Unsinkable\Binaries\Win64\Unsinkable.exe
UnrealBuildTool: Total build time: 40.26 seconds
CommandUtils.Run: Run: Took 40.2973048s to run UnrealBuildTool.exe, ExitCode=5
BuildCommand.Execute: ERROR: BUILD FAILED

Note that this happens when I build the game in the “Development Editor” mode (But not “Development Game”) in visual studio. It also happens when I package in every platform: windows 32, windows 64, html5, etc…
After googling some, I found that this library is the “HACD” thirdparty program that generates 3D collision shapes. It’s used only in the editor, so it makes sense it VS would never look at it while using “Development Game”.
If you peek into the “Engine/Source/Thirdparty/HACD” Directory, you see a single file… “HACD.Build.cs”. Within this file, it has these lines:


if (Target.Configuration == UnrealTargetConfiguration.Debug && BuildConfiguration.bDebugBuildsActuallyUseDebugCRT)
            {
                PublicAdditionalLibraries.Add("HACDd_64.lib");
            }
            else
            {
                PublicAdditionalLibraries.Add("HACD_64.lib");
            }

…So it looks like whenever I try to package in debug mode, this will happen: it won’t be able to find the .lib and fail. HOWEVER I’m trying to package in Development mode. Sooo… I’m sad :frowning:
I’ve tried reinstalling everything, but does anyone have any sort of directory or file within this place:

Hello ,

I’ll be glad to help you find the root of this issue. Could you please make an answerhub post for this issue in the Packaging & Deployment section? Afterwards, please link the answerhub post here so that anyone who finds the forum post can be directed there for more information. On top of that, I have a couple questions for you. Does this only happen with your project or does it also happen when trying with a fresh project? Did this happen prior to 4.9 or is it new to this version of the engine?

I’ll do that when I find time, thanks!
It originally happened quite a long time ago, but I managed to get it working for “Development Editor” mode only… this was back in 4.8, 4.7, or maybe even 4.6.
And it only happens to my project, not new ones. :confused:

Thanks for your help!!

Hi
I have a similar problem with the hacd_64.lib. When packaging I got the same link error. Do you have solution for the issue?

thanks for the help.

Adding my issues with this too. I deleted Binaries, and Intermediate, recreated the VS project files with UE and rebuilt with Development Editor | Win64 but still have the same problem when trying to Package the project (which uses Shipping | Win64):



MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: [6/6] Link GameName-Win64-Shipping.exe
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: LINK : fatal error LNK1181: cannot open input file 'HACD_64.lib'


hi i didnt see this before, sorry!, i solve this issue some time ago but i dont know if apply for us, in my case link error HACD_64.lib happens because i use “UnrealEd” module, and this module use that lib, in order to solve we need know UnrealEd is just for editor, so it cant be package in game, same for HACD_64.lib you cant include in a package!, so we need create a diference in the unreal build system!, check my self talk thread! jaja! this: Custom Input Device Package problem - C++ - Epic Developer Community Forums
the key point is in a file.Build.cs if we use UnrealEd be sure just add for editor like this:



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



i hope this helps

cheers!

1 Like

Good point. In case others encounter this, I had UMGEditor in my .UProject file. Once I removed it packaging worked :slight_smile: