Hey guys,
I’m trying to compile and use Modules as dll, so I can them load up at runtime through FModulManager::LoadModule…
So to do that I added a new Target to my project witch only uses the module I want as dll and activated the bShouldCompileAsDLL option… the module contains Actors with Blueprint exposed functions. When I now compile for shipping I get this error:
OtherModule modifies the value of bShouldCompileAsDLL. This is not allowed, as OtherModule has build products in common with UE4Game.
OtherModule.Target.cs:
using UnrealBuildTool;
using System.Collections.Generic;
public class OtherModuleTarget : TargetRules
{
public OtherModuleTarget(TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
ExtraModuleNames.AddRange( new string[] { "OtherModule" } );
LinkType = TargetLinkType.Modular;
bShouldCompileAsDLL = true;
}
}
OtherModule/OtherModule.Build.cs:
using UnrealBuildTool;
public class OtherModule : ModuleRules
{
public OtherModule(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
}
}
How can I compile this target as DLL for LoadModule