Compiling API exits

After you have written an exit, you compile and link it as follows.

The following examples show the commands used for the sample program described in The API exit sample program. For platforms other than Windows systems, you can find the sample API exit code in MQ_INSTALLATION_PATH/samp and the compiled and linked shared library in MQ_INSTALLATION_PATH/samp/bin. For Windows systems, you can find the sample API exit code in MQ_INSTALLATION_PATH \Tools\c\Samples. MQ_INSTALLATION_PATH represents the directory in which IBM® MQ was installed.

Note to users:
  1. Guidance on programming 64 bit applications is listed in Coding standards on 64-bit platforms
With the introduction of Multicast clients, API exits and data-conversion exits need to be able to run on the client-side because some messages might not go through the queue manager. The following libraries are now part of the client packages as well as the server packages:
Table 1. Libraries that are now in the client and server packages
Operating system Libraries
Windows 32 bit & 64 bit: mqm.dll & mqm.pdb
Linux® & HP-UX 32 bit & 64 bit: libmqm.so & libmqm_r.so
AIX® 32 bit & 64 bit: libmqm.a & libmqm_r.a
Solaris 32 bit & 64 bit: libmqm.so
[IBMi]IBM i [IBMi]LIBMQM & LIBMQM_R