calling Fortran from IDL [message #26435] |
Mon, 27 August 2001 09:47  |
snert13
Messages: 1 Registered: August 2001
|
Junior Member |
|
|
I have (unsuccessfully) tried to call F77 numerical recipes routines
from within
IDL. I used Stein Vidar Hagfors Haugan's perl script to produce a
C-wrapper but couldn't compile it. I'm running RedHat 6.2 (IDL 5.3).
Some of the errors I get are "IDL_MEMINT' undeclared (first use in
this function)"; "`N_' undeclared (first use in this function)" -
since I know no
C at all I have no idea how to fix the above.
My goal is to use some of the numerical recipes ordinary differential
equation routines (e.g. odeint) and I need to do this rather quickly.
Any help would be very much appreciated.
|
|
|
Re: Calling FORTRAN from IDL [message #41456 is a reply to message #26435] |
Fri, 29 October 2004 04:54  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Aarthi,
for beginners I recommend to stick with CALL_EXTERNAL. Besides the external
development guide, you can also look in C:\RSI\IDL61\external\call_external
for some examples ready to compile. If you are on Windows and want to use
cygwin to compile, look at the recent tech tips on the RSI web site. I bit
my nails out on that one and never got it to work until I started using the
M$ C compiler.
Have fun,
Haje
"Aarthi" <aarthi.arunkumar@colorado.edu> wrote in message
news:ac6d0b32.0410281434.7d0a7686@posting.google.com...
> Hi,
> How can I call a FORTRAN routine from an IDL program?
> Thanks,
> Aarthi
|
|
|
Re: Calling FORTRAN from IDL [message #41460 is a reply to message #26435] |
Thu, 28 October 2004 17:00  |
Randall Skelton
Messages: 31 Registered: October 2004
|
Member |
|
|
You can use CALL_EXTERNAL or write a Dynamically Linked Module (DLM) in
C that calls your Fortran routine. A simple example is given in the
IDL External Development Guide (edg.pdf) under the section,
CALL_EXTERNAL (chapter 9, p. 219 for version 6.1).
Cheers,
Randall
|
|
|