Refer to the topic UNIX Installation Procedures for installation procedures common to all UNIX platforms.
Mount the CDROM distribution using the command
# mount <mount point>
as root. The file /etc/vfstab contains definitions for CDROM mount points if they exist. 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.
Unlike most UNIX systems, SOLARIS 2.x systems do not distribute any compiler with their base systems. The PI-API utility programs come pre-built on these systems. They should run as installed without relinking. To build custom PI-API programs, a compiler license and software must be purchased and installed.
No additional linking or compiling changes are required from earlier versions of the PI-API.
-Xc Compile assuming strict ANSI C conformance
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:
|-Dsparc||Processor - used for endianism|
|-Dsolaris||Preprocessor definition for some PI-API header files.|
Link C programs using cc which calls ld with the proper C run time objects and libraries.
|-Bstatic||To link with static libraries (libpiapi.a)|
|-Bdynamic||To link with dynamic libraries (libpiapi.so)|
The -B switches above govern the use of shared versus static libraries. All libraries following a -B switch will use the requested library type until a different -B switch is encountered. In this way you may mix the use of archive and shared libraries. Not all system libraries are available in both forms.
Link with libraries:
-lpiapi -lm -lnsl -lsocket -lC -lposix4