My engine works also with inheritances. Do you also create those classes dynamically. My engine for example: I have a list of all classes that exists within the engine and create them when loading a map. The class name is it's identifier.

In a dll you can create 1 class and inherent all other classes from that one. Simple as that