HP MLIB User's Guide Vol. 2 7th Ed.
Chapter 12 VMATH 795
Accessing VMATH
Include files
For C or C++, include the header <vmath.h> to use the functions and auxiliary
macros for the VMATH library, or include <vmath8.h> to use them for the
VMATH8 library.
For Fortran, the include file vmath.fi provides interfaces for the VMATH
subprograms and defines auxiliary parameters. This include file serves for both
VMATH and VMATH8 libraries.
Compiling and linking
If your program uses the VMATH library, specify -lvmath on the command
line that effects the link. If your program uses the VMATH8 library, specify
-lvmath8. On some systems, you will need to specify -lm also. The VMATH
and VMATH8 libraries are available as archives for static linking and as
shared libraries for dynamic linking. The libraries are located under the
directory whose name reflects the configuration. Please refer to the release
notes for more specific information on library locations.
For example, for shared linking with the ILP32 VMATH library in
Itanium-based HP-UX, link with
% [f90|cc|aCC] [options] file ... -L /opt/mlib/lib/hpux32
-lvmath -lm
For archive linking with the LP64 VMATH8 library in Itanium-based HP-UX,
link with
% [f90|cc|aCC] [options] file ... -Wl,-aarchive_shared -L
/opt/mlib/lib/hpux64 -lvmath8
For shared linking with the VMATH library in HP-UX for PA-RISC 2.0, link
with
% [f90|cc|aCC] [options] file ... -L /opt/mlib/lib/pa2.0
-lvmath -lm
For archive linking with the VMATH library in HP-UX for PA-RISC 2.0W, link
with
% [f90|cc|aCC] [options] file ... -Wl,-aarchive_shared -L
/opt/mlib/lib/pa20_64 -lvmath -lm