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

Home » Public Forums » archive » Fortran call_external under linux
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 call_external under linux [message #24112 is a reply to message #24039] Thu, 08 March 2001 07:35 Go to previous message
James Tappin is currently offline  James Tappin
Messages: 54
Registered: December 1995
Member
u600067138@spawnkill.ip-mobilphone.net wrote:

> We are currently migrating from SGI IRIX to Red Hat 6.2 Linux. We rely on
> some fortran code, and would prefer to be able to use call_external
> instead of spawn with all its overhead etc.
>
> Apparently IDL does not have any example fortran code to work with the g77
> compiler, and the IRIX code does not compile. It seems that the
> "structure" and "record" constructs which is used to pass
> strings between IDL and fortran is not recognized by g77.
>
> Does anybody have experience with compiling fortran under Linux and
> linking it to IDL (5.4) ?
>

Records/structures are indeed an extension that g77 doesn't support.

I haven't actually tried it, but I believe that passing the string by
value, which passes a normal C-type string pointer and passing the length
explicitly should do the job.

g77, like most modern fortrans, adds one extra argument for each string at
the end of the argument list.

You'll need a C-stub to convert the argc, argv arguments.

James

--
+------------------------+-------------------------------+-- -------+
| James Tappin | School of Physics & Astronomy | O__ |
| sjt@star.sr.bham.ac.uk | University of Birmingham | -- \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722 | |
+--------------------------------------------------------+-- -------+
[Message index]
 
Read Message
Read Message
Previous Topic: Overriding unfocussable Windows.
Next Topic: astronomical coordinate conversion

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

Current Time: Wed Dec 03 06:58:49 PST 2025

Total time taken to generate the page: 0.72177 seconds