Hello,
I’m trying to package my app without success. I get the "UnrealBuildTool: LINK : fatal error LNK1181: cannot load file ‘HACD_64.lib’
I found lots of answers about this on the forum but nothing is working in my case.
For you to know, I use a third party library in my project, “Kinect20”. I added the library in my project folder, and adapted my build.cs to load it (see below). Plus, in visual studio, “Debog” → “UE4 properties” → “VC++ Directory” I added the path to kinect20 Includes and Libraries.
The kinect is working in the editor, I don’t think it comes from that but… mhhee…
The logs:
MainFrameActions: Packaging (Windows (64-bit)): Running AutomationTool...
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: 2016-06-03T14:28:28.7963353Z: Running on WindowsHostPlatform as a 64-bit process.
MainFrameActions: Packaging (Windows (64-bit)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=C:/Users/balthazar/Desktop/Phobia/Phobia.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=C:/Users/balthazar/Desktop/Phobia/Phobia.uproject -cook -stage -archive -archivedirectory=C:/Users/balthazar -package -client
config=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: Setting up command environment.
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: Compiling scripts.
MainFrameActions: Packaging (Windows (64-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for C:\Users\balthazar\Desktop\Phobia\Phobia.uproject
MainFrameActions: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.11\Engine\Binaries\DotNET\UnrealBuildTool.exe Phobia Win64 Development -Project=C:\Users\balthazar\Desktop\Phobia\Phobia.uproject C:\Users\balthazar\Desktop\Phobia\Phobia.uproject -remoteini="C:\
MainFrameActions: Packaging (Windows (64-bit)): Users\balthazar\Desktop\Phobia" -noxge -generatemanifest -NoHotReloadFromIDE
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 1.4213214s to run UnrealBuildTool.exe, ExitCode=0
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.11\Engine\Binaries\DotNET\UnrealBuildTool.exe Phobia Win64 Development -Project=C:\Users\balthazar\Desktop\Phobia\Phobia.uproject C:\Users\balthazar\Desktop\Phobia\Phobia.uproject -remoteini="C:\Users\balthazar\Desktop\Phobia" -noxge -NoHotReloadFromI
DE -ignorejunk
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Performing 1 actions (4 in parallel)
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: [1/1] Link Phobia.exe
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: LINK : fatal error LNK1181: impossible d'ouvrir le fichier en entr�e 'HACD_64.lib'
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: -------- End Detailed Actions Stats -----------------------------------------------------------
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: C:\Users\balthazar\Desktop\Phobia\Binaries\Win64\Phobia.exe
MainFrameActions: Packaging (Windows (64-bit)): UnrealBuildTool: Total build time: 3.69 seconds
MainFrameActions: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 3.8471473s to run UnrealBuildTool.exe, ExitCode=5
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): C:\Program Files (x86)\Epic Games\4.11\Engine\Binaries\DotNET\UnrealBuildTool.exe Phobia Win64 Development -Project=C:\Users\balthazar\Desktop\Phobia\Phobia.uproject C:\Users\balthazar\
Desktop\Phobia\Phobia.uproject -remoteini="C:\Users\balthazar\Desktop\Phobia" -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.06.03-16.28.31.txt'
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVa
rs)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars)
MainFrameActions: Packaging (Windows (64-bit)): à Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
MainFrameActions: Packaging (Windows (64-bit)): à BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.BuildCommand.Execute()
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
MainFrameActions: Packaging (Windows (64-bit)): à AutomationTool.Program.Main()
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
MainFrameActions: Packaging (Windows (64-bit)): Domain_ProcessExit
MainFrameActions: Packaging (Windows (64-bit)): copying UAT log files...
MainFrameActions: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error
My build.cs
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.IO;
public class Phobia : ModuleRules
{
public Phobia(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { "UnrealEd", "AnimGraph", "BlueprintGraph" });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
// {
// if (UEBuildConfiguration.bCompileSteamOSS == true)
// {
// DynamicallyLoadedModuleNames.Add("OnlineSubsystemSteam");
// }
// }
LoadKinect20(Target);
}
public bool LoadKinect20(TargetInfo Target)
{
bool isLibrarySupported = false;
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
{
isLibrarySupported = true;
string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
string LibrariesPath = Path.Combine(ThirdPartyPath, "Kinect20", "Libraries");
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "Kinect20." + PlatformString + ".lib"));
}
if (isLibrarySupported)
{
// Include path
PublicIncludePaths.Add( Path.Combine( ThirdPartyPath, "Kinect20", "Includes" ) );
}
Definitions.Add(string.Format( "WITH_KINECT_BINDING={0}", isLibrarySupported ? 1 : 0 ) );
return isLibrarySupported;
}
private string ModulePath
{
get { return Path.GetDirectoryName( RulesCompiler.GetModuleFilename( this.GetType().Name ) ); }
}
private string ThirdPartyPath
{
get { return Path.GetFullPath( Path.Combine( ModulePath, "../../ThirdParty/" ) ); }
}
}
And the arborescence in my folder’s project:
|
|usual UE4 files
|ThirdParty|
---------------|Kinect20|
---------------------------|Includes
---------------------------|Libraries|
---------------------------------------|x64
---------------------------------------|x86
---------------------------|vgbtechs