HP Fortran Programmer's Guide (B3908-90031; September 2011)

Compiling and linking
Linking HP Fortran programs
Chapter 282
The names of the libraries that the linker is searching. This information can confirm that the linker is
searching the correct libraries.
The names of the object files selected by the linker to resolve the references. The linker may have
found the same name in another library and resolved the reference there.
Many library-related problems are owing to a misplaced -l on the command line. The -L option (discussed
in “Library search rules” on page 84) is also order-sensitive and can cause similar problems.
Linking HP Fortran 90 routines
When calling HP Fortran 90 routines on the HP 9000 Series 800, you must include the appropriate run-time
libraries by adding certain arguments to the aCC command when linking your program. These arguments
depend on how the Fortran 90 routines were compiled:
32-bit PA-RISC 1.1 code
-L/opt/fortran90/lib/ -lF90 -lisamstub
32-bit PA-RISC 2.0 code
-L/opt/fortran90/lib/pa2.0/ -lF90 -lisamstub
64-bit PA-RISC 2.0 code
-L/opt/fortran90/lib/pa20_64/ -lF90 -lisamstub
NOTE For more information on Itanium library paths corresponding to the above examples, see
“Libraries linked by default on Itanium” on page 80 .
Additional HP Fortran libraries
HP Fortran provides the following two libraries you can link with Fortran programs:
/opt/fortran90/lib/libU77.a on PA-RISC or /usr/lib/hpux[32|64]/libU77.a On Itanium: The
BSD 3f (libU77) library, which provides a Fortran interface to some of the libc system routines.
Programs that reference routines in this library must be compiled with the +U77 option. For information
about porting Fortran programs that reference libU77 routines, see “Migrating to HP Fortran” on
page 219.
/opt/fortran90/lib/libblas.a: The Basic Linear Algebra Subroutine (BLAS) library,
which provides routines that perform common vector and matrix operations. Programs that reference
routines in this library must be compiled with the +lblas option. For more information, see “Calling
BLAS library routines” on page 169. (PA-RISC only)
Both the libU77 and BLAS libraries are described in the HP Fortran Programmers Reference.