Calling C subroutine from FORTRAN

T. Joseph Lazio, Cornell University njzy at vax5.cit.cornell.edu
Thu Nov 15 10:11:42 AEST 1990


Keywords:  C subroutine, FORTRAN program, memory allocation


      I am currently in the midst of converting a program from VMS
      FORTRAN to UNIX FORTRAN.  The program needs to allocate memory.
      In its VMS form, it uses the call LIB$GET_VM.  Unfortunately,
      the only way to allocate memory on my UNIX machine is to use
      the call to malloc, which requires some knowledge of C.

      I have been working on this problem, on and off, for a number
      of months now and have been rather unsuccessful in my attempts
      to call a C subroutine from a FORTRAN program.  If anybody
      else has figured out a way to do this, I would appreciate it
      if you could get in touch with me via e-mail.  Thanks.

-- Joe
--
      T. Joseph Lazio
      Cornell University  (607) 255-6420
      lazio at astrosun.tn.cornell.edu
      lazio at pulsar.tn.cornell.edu



More information about the Comp.lang.c mailing list