Is there any way to compile codes that references unreal API into a static library?

I want to compile some code into a static library, but these codes reference a lot of Unreal’s API. Does UE provide UnrealEngine.dll or UnreanEngine.Core.dll or the like, so that other codes can be referenced. To be more explicit , There is a module in UE as a plugin, now I want to compile the code of this plugin into a static library and put it in my main module as a third party, no longer used as a plugin.