Link a third party DLL (Load time binding) as plugin

How do you link a third party DLL with a .h and .lib file into a UE4 plugin for load time binding?

All tutorials seem to point towards runtime binding with function pointers, although its an option is it possible to use load time binding with DLL for plugin in UE4?

Not solid on the difference between load-time and runtime binding, but I don’t have to mess with function pointers when I include:


in the .Build.cs file for the plugin. Might be what you are looking for.

By load-time vs run-time do you mean…

Load-Time: You wish to control when a dll is loaded, i.e. your going to make the call to the OS, in order to get the loader, set up the code, and do the extern resolution?

Run-Time: You wish to have all referenced DLLs loaded, and externs resolved, when your plugin is loaded?

If it’s the latter then Smerom gave the answer, if it’s the former, I can’t think of anything that would prevent you from invoking the loader of the OS directly.


what do you add in PublicAdditionalLibraries? the dll or the .lib ?

Alright that was very helpful, the library is working but the final problem is the OS starts to look for DLL at standard locations and games binaries folder, where and how should I put the DLL to so that the plugin locates it there instead of reporting missing dll cuz its not in standard locations

alright found that out as well

Anyone looking for the detailed answer about how to use dll with import library in a plugin follow this link