Suppose, on Unix, the main FORTRAN program is in the file cook1.f and the C function is in the file silly1.c, then the commands might be:
% cc -c -I/star/include silly1.c % f77 cook1.f silly1.o -L/star/lib `cnf_link`
Note that the compiling and linking commands are somewhat machine-specific - compiling the FORTRAN routine first and then trying to link the routine using the cc command generally does not work. More details are given in Compiling and Linking.
Armed with the above examples, you should be in a position to start experimenting with mixed language programming. For further information, read on.
CNF and F77 Mixed Language Programming -- FORTRAN and C