From: user1 on
Tobias Burnus wrote:
>
> I agree that -mrtd should not be used. At it only was shortly mentioned
> by James, I want to add the following: gfortran supports since GCC 4.5
> attributes which can be used to set the calling convention. See
> http://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-Compiler-Directives.html
>
>

Thanks for the pointer to 4.5 manual. Yes, it works in my example.

Insert this in the Fortran

!GCC$ ATTRIBUTES STDCALL :: FortranDLL

Don't use -mrtd

Then need alias in VBA declaration for "fortrandll@8"