harryakers
Joined: 01 Sep 2005 Posts: 1
|
Posted: Thu Sep 01, 2005 12:41 pm Post subject: Linking to third-party DLLs |
|
|
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
INTEGER*4, VALUE :: my_int1
INTEGER*4, VALUE :: my_strngptr
INTEGER*2, REFERENCE :: my_int2
INTEGER*2 my_i2r
END FUNCTION
END INTERFACE
Here is the same thing, coded for a different compiler:
INTERFACE TO INTEGER*2 FUNCTION Their_Function (my_int1, my_strngptr, my_int2)
!DEC$ ATTRIBUTES DLLIMPORT :: Their_Function
INTEGER*4 my_int1 [value]
INTEGER*4 my_strngptr [value]
INTEGER*2 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
|
|