I joined the forum a bit too late to see the beginning of the discussion of linking third-party DLLs to FTN 95. Can somebody send me a few lines of code to accomplish this?
Here is a sample of what I want to do -- a sample that is accepted by one Fortran 95 compiler: INTERFACE STDCALL FUNCTION Their_Function (my_int1, my_strngptr, my_int2) RESULT (my_i2r) !DIR$ ATTRIBUTES DLL_IMPORT :: Their_Function INTEGER4, VALUE :: my_int1 INTEGER4, VALUE :: my_strngptr INTEGER2, REFERENCE :: my_int2 INTEGER2 my_i2r END FUNCTION END INTERFACE
Here is the same thing, coded for a different compiler: INTERFACE TO INTEGER2 FUNCTION Their_Function (my_int1, my_strngptr, my_int2) !DEC$ ATTRIBUTES DLLIMPORT :: Their_Function INTEGER4 my_int1 [value] INTEGER4 my_strngptr [value] INTEGER2 my_int2 [reference] END INTERFACE
I am at a loss to figure out what Salford FTN 95 is looking for in an INTERFACE declaration. I have tried various combinations of the above, and everything gives error messages. Would someone please help with this?
If you wish, you could send a private message to me at harry.akers@mms.gov