Compiling data-conversion exits on UNIX and Linux systems
Examples of how to compile a data conversion exit 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.
AIX
Compile the exit source code by issuing one of the following commands:
- 32 bit applications
- Non-threaded
cc -e MQStart -bE:MYFORMAT.exp -bM:SRE -o /var/mqm/exits/MYFORMAT \ MYFORMAT.c -I MQ_INSTALLATION_PATH/inc
- 64 bit applications
- Non-threaded
cc -q64 -e MQStart -bE:MYFORMAT.exp -bM:SRE -o /var/mqm/exits64/MYFORMAT \ MYFORMAT.c -I MQ_INSTALLATION_PATH/inc
HP-UX Itanium platform
Compile and link the exit source code by issuing one of the following sets of commands:
- 32-bit applications
- Non-threaded
Compile the exit source code:
c89 +e +z -c -D_HPUX_SOURCE -o MYFORMAT.o MYFORMAT.c -I MQ_INSTALLATION_PATH/inc
Link the exit object:
ld +b: -b MYFORMAT.o +ee MQStart -o \ /var/mqm/exits/MYFORMAT -L/usr/lib/hpux32 rm MYFORMAT.o
- 64-bit applications
- Non-threaded
Compile the exit source code:
c89 +DD64 +e +z -c -D_HPUX_SOURCE -o MYFORMAT.o MYFORMAT.c -I MQ_INSTALLATION_PATH/inc
Link the exit object:
ld -b MYFORMAT.o +ee MQStart \ -o /var/mqm/exits64/MYFORMAT \ -L/usr/lib/hpux64 rm MYFORMAT.o
Linux
Compile the exit source code by issuing one of the following commands:
- 31 bit applications
- Non-threaded
gcc -m31 -shared -fPIC -o /var/mqm/exits/MYFORMAT MYFORMAT.c \ -I MQ_INSTALLATION_PATH/inc
- 32 bit applications
- Non-threaded
gcc -m32 -shared -fPIC -o /var/mqm/exits/MYFORMAT MYFORMAT.c -I MQ_INSTALLATION_PATH/inc
- 64 bit applications
- Non-threaded
gcc -m64 -shared -fPIC -o /var/mqm/exits64/MYFORMAT MYFORMAT.c -I MQ_INSTALLATION_PATH/inc
Solaris
Compile the 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/MYFORMAT \ MYFORMAT.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/MYFORMAT \ MYFORMAT.c -I MQ_INSTALLATION_PATH/inc -R/usr/lib/64 -lsocket -lnsl -ldl