Previously, we discussed how to add the basic APRE library in the "How to make a basic Makefile" chapter. This chapter describes the library and compile options that should be additionally described in Makefile, which acc (C compiler) is used in HP UX environment.
Additional libraries and compile options for APRE compile in HP UX environment
Libraries to be added to Makefile
As previously mentioned, the basic APRE library "-lapre -lodbccli" must be described in Makefile.
When compiling with only the basic library added, there are system libraries referenced by the APRE library and a reference error occurs. Therefore, system libraries used in APRE must be specified in Makefile as follows.
|Posix thread Library
|Thread library for POSIX thread functions
Math related Library
|Library for using math functions
|Dynamic Linking Loader(DL Library)
|Dynamic loaded (DL) library
|Unwind Express Library
|Library for use of API for stack tracking and stack winding in Itanium-based server
|-lstd –lstream –lCsup -lc
|In case of compiling using acc C compiler in Altibase version 5.3.3 or earlier version, specify C++ library
|Realtime Extension Library to be added
It is necessary to specify the following options to improve performance and specify the compile bit type.
|Multithread Program Compile option
|Designation required when creating a program with multi-thread
|Instruction Set Architecture (ISA) Designation
|Creating 64-bit code for HP-UX on IA64
|Creating 32-bit code for HP-UX on IA64
|Option to reduce unnecessary warning messages
Example of Simple Makefile
The simplest Makefile that can compile APRE in HP acc environment is completed as follows. In addition, if there is an additional library referenced by the program, the library must be additionally described in Makefile.
Example of Makefile for 32bit compile
An example of the APRE Makefile for acc that specifies the 32bit compile option is as follows. Specify "+DD32" as a compile option, and specify the path where the 32bit APRE library is installed in the path referencing the header file and library. In addition, the APRE precompiler also specifies the path to execute 32bit APRE.