When I try to package a game (C++ project) that uses XmlParser it fails.
The game runs without any problem in editor.
(I’m using UE 4.6.1.)
Shipping:
error LNK1181: cannot open input file ‘C:\Program Files\Epic Games\4.6\Engine\Binaries\Win32\UE4Game-Redist-XmlParser-Win32-Shipping.lib’
Development:
error LNK1181: cannot open input file ‘C:\Program Files\Epic Games\4.6\Engine\Binaries\Win64\UE4Game-Redist-XmlParser.lib’
I’m getting the exact same issue on 4.5.0. Looking in the directory UE4Game-Redist-XmlParser.lib doesn’t exist… (but there is an Editor version of the library, which explains why it works in Editor).
Unable to package an early version of my project until this is fixed.
I got that once and what solved my problem was to explicitly add the dependency in the Build.cs file:
PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “XmlParser” });
Thanks for the reply. That’s not the issue, though. My *.Build.cs file:
using UnrealBuildTool;
public class SSTD : ModuleRules
{
public SSTD(TargetInfo Target)
{
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "XmlParser"});
PrivateDependencyModuleNames.AddRange(new string[] { });
// 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");
// }
// }
}
}
It works on Editor. But if you do packaging then it failed on linking stage.
I changed my code to use JSON. It has no problem even if I package with Shipping configuration.
Ah, I’m not familiar with JSON. I may have a look at that and Data Tables (Data Driven Gameplay Elements) as it looks like that fits my needs perfectly.
Still disappointed that I can’t use XmlParser…
It works if we use the engine built from source.