C calls FORTRAN subroutine

root at uokmet.UUCP root at uokmet.UUCP
Tue Oct 23 02:49:00 AEST 1984


/***** uokmet:net.unix / uicsl!mather /  4:31 pm  Oct 14, 1984 */

>>> Calling C from FORTRAN is nice, but going the other way is a real pain,
>>> especially since you have to include all of the libF77 and libI77 junk.
>>> Messy messy messy.

There is a nice little trick that I've discovered of recent.  If you
have a C main program that calls FORTRAN routines, use "MAIN__()"
instead of "main()", then compile with f77!  The linking is done for you.

There is documentation called "A Portable Fortran 77 Compiler"
(found in "UNIX Programmers' Manual" Volume 2B, at least that's
its location for 2BSD) that might also be of some use.

	Kevin W. Thomas
	Univ. of Oklahoma
	Norman, OK  73019

UUCP:  ...!ctvax!uokvax!uokmet!kwthomas



More information about the Comp.unix mailing list