@epic please add UE 4.27 to the Product version list. The issue is related to 4.27
I have read several posts as well as code examples such as this one. in order to understand how to link
a plugin module with third party DLLs. In my case I am integrating some of the FFMPEG libraries into a plugin.
I put the DLLs in “ThirdParty/ffmpeg/bin” directory whereas “ThirdParty” is located at the same directory where resides Build.cs file.
Here is the part where I set up all the dependencies for ffmpeg libs:
PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "ThirdParty/ffmpeg/include"));
// Add any import libraries or static libraries
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "ThirdParty/ffmpeg/lib", "avcodec.lib"));
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "ThirdParty/ffmpeg/lib", "avformat.lib"));
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "ThirdParty/ffmpeg/lib", "avutil.lib"));
PublicAdditionalLibraries.Add(Path.Combine(ModuleDirectory, "ThirdParty/ffmpeg/lib", "swscale.lib"));
PublicLibraryPaths.Add(Path.Combine(ModuleDirectory, "ThirdParty/ffmpeg/bin"));
PublicDelayLoadDLLs.Add("avcodec-58.dll");
PublicDelayLoadDLLs.Add("avformat-58.dll");
PublicDelayLoadDLLs.Add("avutil-56.dll");
PublicDelayLoadDLLs.Add("swscale-5.dll");
PublicDelayLoadDLLs.Add("swresample-3.dll");
string BaseDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", ".."));
string FFMPEGBinDirectory = Path.Combine(BaseDirectory, "ThirdParty", "ffmpeg", "bin");
RuntimeDependencies.Add(Path.Combine(FFMPEGBinDirectory, "avcodec-58.dll"));
RuntimeDependencies.Add(Path.Combine(FFMPEGBinDirectory, "avformat-58.dll"));
RuntimeDependencies.Add(Path.Combine(FFMPEGBinDirectory, "avutil-56.dll"));
RuntimeDependencies.Add(Path.Combine(FFMPEGBinDirectory, "swscale-5.dll"));
RuntimeDependencies.Add(Path.Combine(FFMPEGBinDirectory, "swresample-3.dll"));
The problem is, those dlls are still not getting delayed. Once I am launching the project the engine spits a notification that it hasn’t been able to located those .dlls, which is makes sense as I didn’t deploy those files into Binary folder.That’s the whole point of using PublicDelayLoadDLLs, isn’t it?
Can anyone explain what I am missing here? Again, the goal is to load the DLLs. manually in runtime during my plugin module startup.
Thanks.