From: emmart@cs.unc.edu (Niall Emmart)
Subject: Mixing fortran and C on a DECstation 5000
Date: 7 Apr 92 15:50:41 GMT [thread overview]
Message-ID: <11097@borg.cs.unc.edu> (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
reply other threads:[~1992-04-07 15:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox