I'm in a time crunch and unsure in my current frame of mind as to where all I should look to understand this, so thought I'd ask here: can procedures returning ALLOCATABLE types be exported from a dynamic-link library (DLL)?
Consider the simple example below:
FUNCTION foo() RESULT(Message) !.. Function result CHARACTER(LEN=:), ALLOCATABLE :: Message Message = "Hello World!" RETURN END FUNCTION foo
Can such a function be exported from a DLL and called from another program, say a Fortran console application? I get a run-time library exception when I do so:
forrtl: severe (157): Program Exception - access violation Image PC Routine Line Source ntdll.dll 76F4E41B Unknown Unknown Unknown ntdll.dll 76F4E023 Unknown Unknown Unknown kernel32.dll 757614AD Unknown Unknown Unknown ... ...
Are function exports a no-no that is widely known, but about which I was unaware?