HP-UX

Refer to the topic UNIX Installation Procedures for installation procedures common to all UNIX platforms.

Extracting Distribution Files

Mount the CDROM distribution using the command

# mount <mount point>

as root. The file /etc/checklist contains definitions for CDROM mount points if they exist. Use the administration utility, sam, if possible to define and mount the CDROM directory. Otherwise, consult the manual page for mount for details on setting up the CDROM mount point. Once the CDROM is mounted, follow the instructions for extracting and installing the software distribution in UNIX Installation Procedures.

Compilation

Source Modifications

When building C programs the first executable line of the C main source file must be

_main();

This causes the static C++ objects in the library to be initialized. Without this programs will core dump when they try to connect. C++ programs do not use this line and will fail to link if it is included. You can conditionally define this line as

#ifndef __cplusplus

_main();

#endif

Compile Flags

-Aa Compile under ANSI mode

Predefined Constants

Certain predefined constants are required for successful programming with the PI-API. Your compiler may automatically define these or provide a means to define constants for all compiled modules. If not, these defines must be included in your source before the PI-API header files are included.

For this platform the required constants are:

-D_HPUX_SOURCE

ANSI compatibility name space

-Dhppa

Processor, used for endianism

-Dhpux

Preprocessor definition for some PI-API header files.

Linking

Files must be linked with the C++ linker, CC. The CC linker files are installed if not found on the system.

Link Switches

+s

Allow the use of SHLIB_PATH for finding libraries at run time.

-a archive

Link with static libraries

-a shared

Link with shared libraries

The -a switch indicates the type of library to be used. This argument may appear multiple times in a link. All libraries following such a switch are of the type indicated until another -a switch is encountered.

You can pass link commands from CC or cc using the -Wl command followed by a comma, the switch, and then comma separated arguments to the switch (e.g., -Wl,-a ,archive)

Link with libraries: -lpiapi -lm -lC.ansi

or

Link with libraries: -lpiapi -lm -lstd

System Files Redistributed

Cfront compiled version:

/usr/lib/libC.ansi.1

The following are installed only if needed for relinking.

/opt/CC/bin/c++filt

/opt/CC/lbin/c++patch

/opt/CC/bin/CC

/opt/CC/lib/libcxx.a

/opt/langtools/lib/crt0.o

/opt/langtools/lib/end.o

/usr/lib/nls/C/CC.cat

ANSI C++ compiled version:

/usr/lib/libstd.1

/usr/lib/libstream.1

/usr/lib/libCsup.1

Enabling Operational Intelligence