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

Home » Public Forums » archive » Re: IDL calling a Fortran routines
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL calling a Fortran routines [message #44176 is a reply to message #44167] Mon, 23 May 2005 11:11 Go to previous messageGo to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
I don't think you even need the c wrapper. I havedone this in the past using
wrappers in fortran similar to the one below, which works on Lahey Fortran.
This work on IVF and CVF too, only the DLL_EXPORT statement varies between
the compilers. Don't forget to tell youe fortran compiler to create a dll
insted of lib.

Cheers, Haje.



REAL*4 FUNCTION SUM_ARRAY(ARGC, ARGV)

DLL_EXPORT SUM_ARRAY

INTEGER*4 ARGC, ARGV(*)


J=LOC(ARGC)


CALL SUM_ARRAY1(%VAL(ARGV(1)),%VAL(ARGV(2)),%VAL(ARGV(3)))


SUM_ARRAY=9.9


RETURN

END

<jianguang.guo@gmail.com> wrote in message
news:1116859283.041232.74090@o13g2000cwo.googlegroups.com...
> Hi,I'm a new guy for IDL.I want to call a fortran routine from idl.The
> guide of the IDL tell me that the easy way is by using call_external.
> It seems that most examples are under unix or other OS. When I call
> fortran code via C wrapper,I does not know how to get the
> "example.dll"(I try to run the 'example_c2f.c' from the external
> development guide,but fail). I use IDL6.0 under win2000. I hope to get
> some detailed examples on win.Thanks
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: help: window content erased after resize
Next Topic: Re: isurface transparency not showing lines and points

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

Current Time: Thu Oct 16 01:27:20 PDT 2025

Total time taken to generate the page: 0.24249 seconds