On Thursday, 18 May 2017 at 18:00:02 UTC, Rainer Schuetze wrote:
That's what I meant with "other cross module dependencies". In
this case it might work if you export
_D10handmade_h10game_input6__initZ from your DLL with the help
of a def-file, but that's not something that scales well.
This talk will give you some details on the complications
involved: https://www.youtube.com/watch?v=MQRHxI2SrYM
Thanks for the link Rainer. I actually watched that a few days
ago but it didn't help me understand what I just figured out. It
slipped my mind that structs in D are not just structs like the
ones in C. In D they have default initializer which is actually a
function and as you said I am not exporting that function and it
doesn't scale well to hunt all hidden functions that you need to
export for all common datatypes. Even if I did, since I am
loading DLL and its functions dynamically using GetProcAddress,
how could I even tell D to use loaded function pointer as
initialization function for a type...
Anyway I will stick with the solution of using a separate file
where all common datatypes are defined in both projects and see
how far I get with it.