Exposing a thirdparty DDL with C++ Classes Header globally to Unreal projects

Hello Devs,
maybe a repeated topic but after searching for days I am still not enlighted enough…

Assume I have a thirdparty library (a DLL for Windows, a dynlib for MAC OS…),
that exports some Standard C functions, and that is accompanied with a C++ header file
defining higher-level wrapper classes for that Library.

What is all necessary to install this in Unreal (plugins ?) that it is globally available
for new Unreal projects ?

It sounds simple but the most information I got so far is how to CREATE a plugin
inside a project, and the folder trees that are under “Unreal/Engine/PlugIns” is somehat confusing and not really self-explaining. I understand Unreal uses a specific DLL loading mechanism, but overall it is not clear to me where to start…

Any help is appreciated !!
Thanks, Peter

Hello, You’d set this up in your plugin’s Build.cs file. The engine code is the best reference (you don’t need a source build, and can have a look at it from the launcher version of the engine)

Create your plugin (Edit > Plugins > New Plugin). Then open up your C++ project in visual studio (or rider) and head over to your plugin’s Build.cs file

Here you’d include your .dll, .lib, .so etc. Check this as a reference

UE_5.5\Engine\Source\Editor\AudioEditor\AudioEditor.Build.cs

		if (Target.IsInPlatformGroup(UnrealPlatformGroup.Windows))
		{
			string PlatformName = "Win64";

			string LibSndFilePath = Target.UEThirdPartyBinariesDirectory + "libsndfile/";
			LibSndFilePath += PlatformName;


			PublicAdditionalLibraries.Add(LibSndFilePath + "/libsndfile-1.lib");
			PublicDelayLoadDLLs.Add("libsndfile-1.dll");
			PublicIncludePathModuleNames.Add("UELibSampleRate");

			RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/libsndfile/" + PlatformName + "/libsndfile-1.dll");

			PublicDefinitions.Add("WITH_SNDFILE_IO=1");
		}
		else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Apple))
		{
			string PlatformName = "Mac/";
			string LibFilename = "libsndfile.1.dylib";
			string LibFolder = "libsndfile/";
			string LibSndFilePath = Path.Combine(Target.UEThirdPartyBinariesDirectory, LibFolder, PlatformName, LibFilename);

			PublicDelayLoadDLLs.Add(LibSndFilePath);
			PublicIncludePathModuleNames.Add("UELibSampleRate");
			RuntimeDependencies.Add(LibSndFilePath);
			
			PublicDefinitions.Add("WITH_SNDFILE_IO=1");
		}

or this: UE_5.5\Engine\Source\ThirdParty\OpenColorIO\OpenColorIOLib.Build.cs


		if (Target.Platform == UnrealTargetPlatform.Win64)
		{
			string Arch = Target.Architecture.WindowsLibDir;
			string DLLName = "OpenColorIO_2_3.dll";
			string LibDirectory = Path.Combine(BinaryDir, PlatformDir, Arch);

			PublicAdditionalLibraries.Add(Path.Combine(DeployDir, "lib", PlatformDir, Arch, "OpenColorIO.lib"));
			RuntimeDependencies.Add(
				Path.Combine(ProjectBinariesDir, DLLName),
				Path.Combine(LibDirectory, DLLName)
			);

			bIsPlatformAdded = true;
		}
		else if (Target.IsInPlatformGroup(UnrealPlatformGroup.Unix))
		{

Thanks a lot, appreciate it !!