Suppose we have a derived type
module this_mod type :: this_type integer :: foo contains procedure :: bar end type this_type interface this_type module procedure :: constructThis end interface this_type contains function constructThis() result(This) !DEC$ ATTRIBUTES DLLEXPORT :: constructThis type(this_type) :: This end function constructThis end module this_mod
Is this a proper way to export the constructor of this_type? or should the exported name be the same as the derived type's name this_type?
A. King wrote:
.. or should the exported name be the same as the derived type's name this_type?
You should be able to use ALIASing facility with !DIR$ ATTRIBUTES to export the name of your choice, otherwise it must be the name of the procedure plus you may need decorations depending on the calling conventions in effect (e.g., STDCALL).