Configuring and Managing MPE/iX Internet Services (August 2002)

Chapter 9
HP WebWise MPE/iX Secure Web Server
Archive libraries
171
Archive libraries
Archive libraries may be either custom archive libraries (built by others) or system archive libraries. System
archive libraries are .a files residing in /lib and /usr/lib.
The following shows how to build hw.c as an archive library then link it into mod_hw.so:
shell/iX> cd /APACHE/PUB/hw
shell/iX> gcc -c -DMPE -D_POSIX_SOURCE -D_SOCKET_SOURCE -DNO_DBM_REWRITEMAP
-DUSE_HSREGEX -DEAPI -DSHARED_MODULE -I/APACHE/PUB/include hw.c
shell/iX> ar -rv hw.a hw.o
ar: creating hw.a
a - /APACHE/PUB/hw/hw.o
1 OBJECT FILE HAS BEEN ADDED.
shell/iX> callci linkedit
HP Link Editor/iX (HP30315A.06.15) Copyright Hewlett-Packard Co 1986
LinkEd> buildxl xl=./mod_hw.so;limit=5
LinkEd> addxl from=./mod_hw.o;to=./mod_hw.so;merge;share;rl=./hw.a,/lib/libm.a,
/lib/libc.a
1 OBJECT FILE HAS BEEN ADDED.