HP MLIB User's Guide Vol. 1 7th Ed.

8 HP MLIB User’s Guide
Accessing VECLIB
Linking with libisamstub.a
C language codes that call Fortran77 routines from the BLAS Standard, the
sparse linear equation system, or the sparse eigenvalue system, must explicitly
link the ISAM (Indexed Sequential Access Method) stubs library into the
program. For example,
cc [options] file ... –Wl,–aarchive_shared,–L/opt/fortran/lib/libisamstub.a
lveclib
lcl lm
This only applies if you are linking with the VECLIB archive library.
This option is only valid for 32-bit PA systems.
For Itanium-Based HP-UX Systems
1. To link a program that uses VECLIB for use on the same machine, use one
of the following commands:
f90 [options] file ... –Wl,–aarchive_shared lveclib
cc
[options] file ... –Wl,–aarchive_shared lveclib lcl lm
aCC
[options] file ... –Wl,–aarchive_shared lveclib lcl lm
2. Specify the entire path of the library file on the compiler command line that
links your program. To link your program with VECLIB for use with 32- or
64-bit addressing on an HP-UX system, use one of the following:
f90 [options] file ... /opt/mlib/lib/[hpux32|hpux64]/libveclib.a
cc
[options] file ... /opt/mlib/lib/[hpux32|hpux64]/libveclib.a lcl lm
aCC
[options] file ... /opt/mlib/lib/[hpux32|hpux64]/libveclib.a lcl lm
Replace libveclib.a with libveclib.so on your compiler command line if you
want to link the shared library on an Itanium-based system.
3. Use the lveclib option on the compiler command line that links your
program, preceded by:
Wl,–aarchive_shared,L/opt/mlib/lib/[hpux32|hpux64]
For example, the command lines in Method 2 for HP-UX could be written:
f90 [+DD32|+DD64] [options] file...Wl,–aarchive_shared,L/opt/mlib/lib/
[hpux32|hpux64]
lveclib
cc [+DD32|+DD64]
[options] file ... Wl,–aarchive_shared,L/opt/mlib/lib/
[hpux32|hpux64]
lveclib lcl lm
aCC [+DD32|+DD64]
[options] file ... Wl,–aarchive_shared,L/opt/mlib/lib/
[hpux32|hpux64]
lveclib lcl lm
4. Set the LDOPTS environment variable to include: