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

Appendix A 1093
Linking VECLIB subprograms into a C program
Linking VECLIB subprograms into a C program
You can call VECLIB or LAPACK subprograms from a program coded in C by
including lveclib -lcl or llapack -lcl on the cc command line that links your
program:
cc o test test.c lveclib -lcl
cc o
test test.c llapack -lcl
Error handling
MLIB contains two standard error handlers, subroutines XERBLA and
XERVEC. Refer to “XERBLA” on page 337 and “XERVEC” on page 623. In
addition, the documentation for every subprogram indicates if it calls an error
handler and, if so, under what conditions.
Error handlers in VECLIB and LAPACK work the same way.
The error handlers are designed to be compatible with both the Fortran and the
C runtime systems. If either error handler is called within a Fortran program,
it writes an error message onto the standard error file and terminates
execution with a nonzero exit status. When called within a C program, the error
handler writes the error message onto the standard error file and raises signal
SIGIOT. If the program has not provided a signal handler for SIGIOT, a core
image is produced and execution terminates with a nonzero exit status. This is
illustrated in Figure A-4.