i am working on a project that needs to load dynamic libraries at runtime (.dylib because i am under macos).
I am able to load my (very simple) library using FPlatformProcess::GetDllHandle and FPlatformProcess::GetDllExport. I would like to include Unreal Headers to have a valid reference to Unreal Engine Object ( as such as AActor and so on…). I do not need implementation because those dll will be loaded inside main game.
When i try to include Engine.h or whatelse i get a bunch if errors.
Is there a “right way” to generate dylibs that use Unreal Objects?
You probably want to create a module/plugin type project. See if this page from the UE4 wiki helps https://wiki.unrealengine.com/An_Introduction_to_UE4_Plugins
Thanks. I used modules, following link you provided, and i achieved a good enough result