delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/09/09:01:24

From: Dobler Ervin <dobler AT hercules DOT elte DOT hu>
Newsgroups: comp.os.msdos.djgpp
Subject: Calling Fortran code from a C program
Date: Fri, 09 May 1997 14:05:03 +0200
Organization: BME AFT
Lines: 18
Message-ID: <337312EF.2B7@hercules.elte.hu>
Reply-To: dobler AT hercules DOT elte DOT hu
NNTP-Posting-Host: surph2.fat.bme.hu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I have a package of routines written in Fortran77, and I would like to
call them from a C program. I'm using GNU's g77 and GNU C.
If there is somebody who can answer my questions I would be very
grateful.
My questions are:
1. How can I specify the appropriate calling convention?
2. What type of name mangling does the f77 compiler use?
3. Should I have indicate something in the fortran code as well?
4. What are the appropriate gcc command-line switches for .f and .c
files?
5. I would like to access variables, arrays in the fortran code as well.
Does it differs from accessing functions?

Please send your answers at 'dobler AT hercules DOT elte DOT hu'.
Thanks in advance

Ervin Dobler
Technical University of Budapest, Department of Atomic Physics.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019