Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Mixing fortran and C on a DECstation 5000
@ 1992-04-07 15:50 Niall Emmart
  0 siblings, 0 replies; only message in thread
From: Niall Emmart @ 1992-04-07 15:50 UTC (permalink / raw)


Hello...
   I'm trying to get some old code running that mixes fortran and C.
The C code has the main routine, which does argument cracking and
calls fortran routines to perform functions like dft, and fft. 
   The C code looks something like this:

main()

{
  .
  .
  .
  f_init();
  .
  . /* do useful work */
  .
  f_exit();
  exit(0);
}

   When I try to compile this, (using f77, V3.1) I get link errors
stating that f_init and f_exit are undefined. 
   Deleting these lines seems to cure the problem. The program 
produces the right output, etc... My questions are:
1)  should I call something in place of those routines? 
2)  are there any side effects of not calling these routines?
    For example, not being able to catch numeric errors such as
    divide by zero?
3)  are there any other gotchas that I might not know about, that
    occur mixing fortran and C?
4)  are there any online documents which describe mixing fortran and
    C?

Thanks very much,
    Niall Emmart

   


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-04-07 15:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1992-04-07 15:50 Mixing fortran and C on a DECstation 5000 Niall Emmart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox