I have created a plugin where I utilize a static library I’ve written and compiled, this runs fine as the editor starts up.
#include "Chives.h" // location of header for Dial - definition in external static library
void FNamedModule::StartupModule()
{
// This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
UE_LOG(LogTemp, Warning, TEXT("!!!!"))
Dial("localhost", 15000, 6000);
}
However, when I create an actor in the project (outside the plugin modules), I’m met with unresolved external symbol linker errors.
I created a module within the plugin for the Chives static library. The build.cs is as follows:
using System;
using System.IO;
using UnrealBuildTool;
public class Chives : ModuleRules
{
public Chives(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "include"));
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "lib", "chives.lib"));
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "lib", "peppermint.lib")); // dependency of chives.lib
}
}