HP Fortran Programmer's Guide (September 2007)
Compiling and linking
Linking HP Fortran programs
Chapter 278
The libisamstub library is provided as a tool for migrating HP FORTRAN 77 programs
that call ISAM routines. 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.
When the linker finds a reference in your program to a name that is not defined in the
program (for example, the DOT_PRODUCT intrinsic), it looks to resolve it in the default libraries.
If it cannot find the name in the default libraries, the link will fail unless the command line
specifies additional, nondefault libraries. This section discusses how to link to nondefault
libraries (including shared libraries) and library search rules.
Linking to nondefault libraries
The -l option enables you to specify other libraries for linking, in addition to the default
libraries listed in Table 2-13. The syntax for this option is:
-l
x
where
x
is a sequence of characters that completes a library name of the form /lib/lib
x
.a or
/usr/lib/lib
x
.a. For example, -lm specifies the math library, /usr/lib/libm.a. (The .a
extension indicates an archive library. You can also link to shared libraries, which have
the .sl extension; see “Linking to shared libraries” on page 80.)
Table 2-13 Libraries linked by default on PA-RISC
Library Contents
/usr/lib/libcl.a Archive version of HP Fortran runtime library
/usr/lib/libcl.sl Shared version of HP Fortran runtime library
/opt/fortran90/lib/libF90.a Archive library of array intrinsic procedures
/usr/lib/libc.a Archive library of intrinsic procedures and
system routines
/usr/lib/libc.sl Shared library of intrinsic procedures and
system routines,
/opt/fortran90/lib/libisamstub.a
/opt/fortran90/lib/libisamstubs.a
Archive libraries of stubs to satisfy ISAM
references
/usr/lib/libisamstub.sl Shared library of stubs to satisfy ISAM
references