Linking C, C++, and Fortran 77

When a compiler calls a linker, it automatically gives the options needed for the native language to the linker. But if you for example want to link a Fortran program using a C compiler, you have to specify the Fortran compilers run-time libraries (locations and names). To do this one has to locate the run-time libraries for the involved compilers. We will give a few examples of how to find them on Unix machines.

Note that some linker might have an option to include the proper runtime libraries. An example of this is the Silicon Graphics C++ compiler environment; using the CC command to link your objects, you can supply the option -lftn to the linker, and it will use the appropriate Fortran run-time libraries.



Digital UNIX



Linux on an x86



This page was created June 24, 1996
Latest change was made on June 20, 2007.
mail to: webmaster@chiralcomp.com

©1996-2007 Chiral Data HB All Rights Reserved