Mixed programming: Calling FORTRAN from C
问题 I have to do a proof of concept on calling FORTRAN subroutines from C/C++. I don't know what I am in right direction, please guide me.... What I did is... I wrote the following FORTRAN code INTEGER*4 FUNCTION Fact (n) INTEGER*4 n INTEGER*4 i, amt amt = 1 DO i = 1, n amt = amt * i END DO Fact = amt END SUBROUTINE Pythagoras (a, b, c) REAL*4 a REAL*4 b REAL*4 c c = SQRT (a * a + b * b) END compiled it using g77 as g77.exe -c FORTRANfun.for I wrote following c code... #include <stdio.h> extern