To link the proper Fortran and C libraries, use the f77 or f90 command to invoke the linker.
Example 1: Use f77 to link:
demo% cc -c RetCmplxmain.c demo% f77 RetCmplx.f RetCmplxmain.o ¨ This command line does the linking. demo% a.out 4.0 4.5 8.0 9.0 demo%