HP Fortran Programmer's Reference (September 2007)

BLAS and libU77 libraries
Calling libU77 and BLAS routines
Chapter 12 643
Calling libU77 and BLAS routines
This section discusses considerations pertinent to writing and compiling programs that call
libU77 and BLAS routines, including:
The compile-line options that make libU77 and BLAS routines available to your
programs
Declaring the type of return type of library functions
Declaring library functions with the EXTERNAL attribute
BLAS and libU77 man pages
Compile-line options
The following sections describe the compile-line options to use to access routines from the
libU77 and BLAS libraries.
+U77 option
To access libU77 routines, compile with the +U77 option. The entry-point name of each
libU77 routine has an appended underscore, which must also be added to the external name
of any libU77 routine that your program calls. The +U77 option does this. For example, if your
program contains the following call:
CALL FLUSH(unit_no)
compiling with +U77 causes the compiler to generate the external name access_. The +ppu
and +uppercase options have no effect on libU77 external names.
-lblas option
To access BLAS routines, compile with the -lblas option. Unlike most compile-line options,
the -l option must appear at the end of the command line, following any source files that call
BLAS routines. Here is an example command line for compiling do_math.f90 to access BLAS
routines:
$ f90 do_math.f90 -lblas