SourceCode does not Compile properly as Plugin

Hey there.

I am currently trying to write an Unreal-Wrapper for the yaml-cpp library. But for some reason, whenever you try to use the plugin, Unreal has a hard time linking the code and you always get a bunch of Unresolved External Symbol Error Messages.

I added the same source files from the plugin in a fresh project directly as c++ files instead of a Plugin (In the Private/Public folder in the Source directory), which works flawlessly and compiles without any errors. But as soon as I put the files in a Plugin I get the linker errors again. The original library works with Exceptions and other std-classes, but since it compiles directly, I don’t see any particular reason why it shouldn’t be able to compile it in a Plugin.

I am probably just missing an option somewhere, but I can’t find it!

The whole Plugin can be found here, but I will post the most important files below:


UnrealYAML.uplugin:

{
	"FileVersion": 3,
	"Version": 1,
	"VersionName": "1.0",
	"FriendlyName": "UnrealYAML",
	"Category": "Other",
	"CanContainContent": true,
	"IsBetaVersion": false,
	"IsExperimentalVersion": false,
	"Installed": false,
	"Modules": [
		{
			"Name": "UnrealYAML",
			"Type": "Runtime",
			"LoadingPhase": "Default"
		}
	]
}

UnrealYaml.Build.cs

public class UnrealYAML : ModuleRules {
	public UnrealYAML(ReadOnlyTargetRules Target) : base(Target) {
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
		PublicDependencyModuleNames.AddRange(new[] {"Core", "Projects"});

		bEnableExceptions = true;
		bUseRTTI = true;

		PublicIncludePaths.Add(Path.Combine(PluginDirectory, "Source", "UnrealYAML", "yaml-cpp", "include"));
		PrivateIncludePaths.Add(Path.Combine(PluginDirectory, "Source", "UnrealYAML","yaml-cpp", "src"));
	}
}

UnrealYAML.h and UnrealYAML.cpp

class FUnrealYAMLModule : public IModuleInterface { };

IMPLEMENT_MODULE(FUnrealYAMLModule, UnrealYAML)

Unfortunately, that doesn’t change anything!

Hello! Can you try this one for your plugin?

		// ... add public include paths required here ...
		PublicIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Public") });

		// ... add other private include paths required here ...
		PrivateIncludePaths.AddRange(new string[] { Path.Combine(ModuleDirectory, "Private") });