HP Fortran Programmer Guide HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 (B3908-90032,December 2012)

The libisamstublibrary is provided as a tool for migrating HP FORTRAN77™programs that
call ISAMroutines. The ISAM library is not available with HP Fortran, but the stub library allows
the linker to resolve references to ISAM routines in HP FORTRAN 77 programs.
Table 22 Libraries linked by default on PA-RISC
ContentsLibrary
Archive version of HP Fortran runtime library/usr/lib/libcl.a
Shared version of HP Fortran runtime library/usr/lib/libcl.sl
Archive library of array intrinsic procedures/opt/fortran90/lib/libF90.a
Shared library of intrinsic procedures and system routines,/usr/lib/libc.sl
Archive libraries of stubs to satisfy ISAM references/opt/fortran90/lib/libisamstub.a
/opt/fortran90/lib/libisamstubs.a
Shared library of stubs to satisfy ISAM references/usr/lib/libisamstub.sl
Table 23 Libraries linked by default on Itanium
ContentsLibrary
Archive version of HP Fortran runtime library/usr/lib/hpux[32|64]/libIO77.a
Shared version of HP Fortran runtime library/usr/lib/hpux[32|64]/libIO77.so
Archive library of array intrinsic procedures/usr/lib/hpux[32|64]/libF90.a
Shared library for Fortran intrinsic procedures/usr/lib/hpux[32|64]/libF90.so
Archive library for Fortran intrinsic procedures on parallel
mode
/usr/lib/hpux[32|64]/libF90_paral lel.a
Shared library for Fortran intrinsic procedures on parallel
mode
/usr/lib/hpux[32|64]/libF90_paral lel.so
Shared library for intrinsic procedures and system
routines
/usr/lib/hpux[32|64]/libc.so
Archive library for Fortran 2003 standard features/opt/fortran90/lib/hpux[32|64]/li bF2003.a
Linking to nondefault libraries
The -loption enables you to specify other libraries for linking, in addition to the default libraries
listed in Table 2-14. The syntax for this option is:
-lx
where xis a sequence of characters that completes a library name of the form /lib/libx.a or
/usr/lib/libx.a. For example,-lm specifies the math library, /usr/lib/libm.a. (The
.aextension indicates an archive library. You can also link to shared libraries, which have the
.slextension; see “Linking to shared libraries” on page 83.)
The -loption is order-sensitive: when the linker finds a reference in an object file that it cannot
resolve in the default libraries, it searches the libraries (if any) specified after the file on the command
line. For example, the following command line tells the linker to look for unresolved references in
the math library as well as the default libraries:
$ f90 prog.f90 -lm
You can also link a library to your program by specifying its name after the name of the source
file that references it, as follows:
$ f90 prog.f90 /usr/lib/libm.a
50 Compiling and linking