Compiling API exits on Unix and Linux systems
Examples of how to Compile API exits on UNIX and Linux systems.
On all platforms, the entry point to the module is MQStart.
MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
On AIX
Compile the API exit source code by issuing one of the following commands:
- 32 bit applications
- Non-threaded
cc -e MQStart -bE:amqsaxe.exp -bM:SRE -o /var/mqm/exits/amqsaxe \ amqsaxe0.c -I MQ_INSTALLATION_PATH/inc
- 64 bit applications
- Non-threaded
cc -q64 -e MQStart -bE:amqsaxe.exp -bM:SRE -o /var/mqm/exits64/amqsaxe \ amqsaxe0.c -I MQ_INSTALLATION_PATH/inc
On HP-UX Itanium platform
- 32 bit applications
- Non-threaded
Compile the API Exit source code:
c89 +e +z -c -D_HPUX_SOURCE -o amqsaxe.o amqsaxe0.c -I MQ_INSTALLATION_PATH/inc
Link the API Exit source codeld +b: -b amqsaxe.o +ee MQStart -o /var/mqm/exits/amqsaxe rm amqsaxe.o
- 64 bit applications
- Non-threaded
Compile the API Exit source code:
c89 +DD64 +e +z -c -D_HPUX_SOURCE -o amqsaxe.o amqsaxe0.c -I MQ_INSTALLATION_PATH/inc
Link the API Exit source codeld -b amqsaxe.o +ee MQStart -o /var/mqm/exits64/amqsaxe rm amqsaxe.o
On Linux
Compile the API exit source code by issuing one of the following commands:
- 31 bit applications
- Non-threaded
gcc -m31 -shared -fPIC -o /var/mqm/exits/amqsaxe amqsaxe0.c \ -I MQ_INSTALLATION_PATH/inc
- 32 bit applications
- Non-threaded
gcc -m32 -shared -fPIC -o /var/mqm/exits/amqsaxe amqsaxe0.c \ -I MQ_INSTALLATION_PATH/inc
- 64 bit applications
- Non-threaded
gcc -m64 -shared -fPIC -o /var/mqm/exits64/amqsaxe amqsaxe0.c \ -I MQ_INSTALLATION_PATH/inc
On Solaris
Compile the API exit source code by issuing one of the following commands:
- 32 bit applications
- SPARC platform
cc -xarch=v8plus -KPIC -mt -G -o /var/mqm/exits/amqsaxe \ amqsaxe0.c -I MQ_INSTALLATION_PATH/inc \ -R/usr/lib/32 -lsocket -lnsl -ldl
- 64 bit applications
- SPARC platform
cc -xarch=v9 -KPIC -mt -G -o /var/mqm/exits64/amqsaxe \ amqsaxe0.c -I MQ_INSTALLATION_PATH/inc \ -R/usr/lib/64 -lsocket -lnsl -ldl