comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL(rsi) + FORTRAN(digital) + DLL(windows nt)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL(rsi) + FORTRAN(digital) + DLL(windows nt) [message #15569] Thu, 20 May 1999 00:00
Michel Kruglanski[2] is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL_RPCImportArray bug?
Next Topic: Image thresholding

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Nov 28 08:42:52 PST 2025

Total time taken to generate the page: 0.02881 seconds