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

Home » Public Forums » archive » Re: FORTRAN DLL and CALL_EXTERNAL
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: FORTRAN DLL and CALL_EXTERNAL [message #11640 is a reply to message #11630] Thu, 21 May 1998 00:00 Go to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
Shane wrote,

> I'm trying to get call_external working under NT4 (i.e. using DLL's)
> using FORTRAN. Has anybody done this before with success? Is there any
> example code (like there is for C in the Advanced development
> guide)...please this would help alot?. The tools I'm using are IDL
> v.5, Digital visual fortran and NT4.

If you can get a DLL written in C to work, and if you can get
a normal C-program to call a FORTRAN subroutine, then you
simply make a C wrapper that calls the FORTRAN subroutine,
and make the DLL by linking the C wrapper + FORTRAN compiler
output (not linked, just compiled) together into a DLL.
Your IDL routine should then call the C wrapper.

If you can't get a C-source DLL to work, you should consult
the Adv. dev. guide + the man pages for your C compiler.

If you can't get a C program to call a FORTRAN routine,
consult the C and FORTRAN man pages.

Hint: Some times there is a lot of problems identifying
the names of subroutines from one compiler to another,
due to various name-altering conventions. Some compilers
put an underscore (or two!) at the beginning or end
of compiled functions, some don't.

Look in the ...idl/external/sharelib directory for examples
of both C and FORTRAN examples.

Regards,

Stein Vidar
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Q: A good way to interrupt and kill procedures?
Next Topic: Q: A good way to interrupt and kill procedures?

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

Current Time: Thu Oct 09 08:35:13 PDT 2025

Total time taken to generate the page: 0.39700 seconds