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

Home » Public Forums » archive » call_external with Fortran
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
call_external with Fortran [message #2772] Mon, 19 September 1994 13:16
mckie is currently offline  mckie
Messages: 3
Registered: September 1994
Junior Member
Having trouble with first attempts to use IDL's call_external
with a Fortran routine on a Sun.

SunOS 4.1.1
SunFORTRAN 1.4
IDL 3.0.0

Using the info given in IDL's on-line .../notes/call_external.doc
file.

A simple Fortran routine in sub.f to be called by IDL's
call_external, intended to print the number of arguments
passed:

subroutine sub(argc,argv)
integer*4 argc
integer*4 argv(*)
n = %loc(argc)
write(*,*) 'In sub: n=',n
return
end

Compiled and linked into a shared object library sub.so using:

f77 -c -pic sub.f
ld -o sub.so sub.o /usr/lang/SC1.0/lib{F77,m}.a

IDL started in the directory containing sub.so, and the following
commands issued:

IDL> a = 2.5
IDL> dummy = call_external('sub.so','_sub_',a)

The result is that IDL immediately dies with the message:

ld.so: map heap error (9) for /dev/zero


Thanks,
Bill McKie
mckie@sky.arc.nasa.gov
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Q: raw data conversion
Next Topic: postscript

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

Current Time: Fri Oct 10 01:15:24 PDT 2025

Total time taken to generate the page: 1.75984 seconds