I want to implement scripting system with Entity Component System, as in Unity or Unreal Engine 4. I have written my engine in c++ and want to use c++ as a scripting language. Now i am looking for way to store script classes in some binary format, so i my engine load them, create instance and use needed methods. I know that dll can be used for this purpose, but there is several problems: you need to write fucntion call conventions, (dllimport) and etc. and you can't create instance of class directly, you need to write a function, which will create instance of class, in your script. So how to avoid this problems? I know it is possible to use macros for call conventions to make code cleaner,like UE4 does, but is it possible to create instance of class direcly in my engine without using special functions in dll? Or is there any other binary format for user scripts in which c++ can be compiled?