IDL(rsi) + FORTRAN(digital) + DLL(windows nt) [message #15569] |
Thu, 20 May 1999 00:00 |
Michel Kruglanski[2]
Messages: 1 Registered: May 1999
|
Junior Member |
|
|
I want to access Fortran subroutines from IDL V5.2 using the
CALL_EXTERNAL function under Windows NT 4.0.
I plan to transform the fortran code into a dynamic library (DLL) with
the help of the Digital Fortran V5.0C.
I have tried a single example but I have only succeeded to crash IDL.
My Fortran code (test.f):
integer*4 function test(argc, argv)
cDEC$ ATTRIBUTES DLLEXPORT :: TEST
cDEC$ ATTRIBUTES ALIAS:'UXIDL_' :: TEST
integer*4 argc, argv(*)
print*,'Hello World'
test=0
end
It is compiled by the command:
> df /dll:test.dll test.f
The IDL instruction used is:
s = call_external( 'test.dll', 'UXIDL_' )
And then I get an application error that crashes IDL.
From different test, I know that
- IDL finds the DLL, otherwise it returns the
message ERROR_MOD_NOT_FOUND,
- IDL finds the entry point, otherwise it returns
the message ERROR_PROC_NOT_FOUND.
Note that, in the directory \RSI\IDL52\external\call_external\Fortran
rsi provides an example but without make file (such make file is
provided with the unix distributions).
Thank you for your help and suggestions
Michel Kruglanski
|
|
|