Sunday, August 28, 2011

Fortran DLL used in C# project

If you build a DLL using Fortran, to use it in a managed code such C#, the managed code will treat the name of the DLL (entry point) as being all lower case, no matter what you write. So it is the same to do this:

!DEC$ATTRIBUTES REFERENCE, STDCALL, DLLEXPORT:: Jouraski
subroutine Jouraski (...

or

!DEC$ATTRIBUTES REFERENCE, STDCALL, DLLEXPORT:: Jouraski
subroutine jouraski (...

or

!DEC$ATTRIBUTES REFERENCE, STDCALL, DLLEXPORT:: jouraski
subroutine jouraski (...

Either way you have to use it as Class1. jouraski();

because Class1. Jouraski(); will produce and error "entry point not found"



No comments:

Post a Comment