You need to link your programs with the appropriate library provided by MQSeries.
You must link to one or more of the following libraries:
Library file | Program/exit type |
---|---|
libmqm.so | Server for C |
libmqmzse.so | For C |
libmqic.so | Client for C |
libmqmcs.so | Client for C |
libmqmzf.so | Installable service |
libmqmxa.a | XA interface |
If you are using an additional product such as ENCINA, you need to find the run-time libraries. There are three ways (the first two are preferred, especially if the module is an exit or trigger monitor):
ln -s /opt/encina/lib/*.so /usr/lib
LD_LIBRARY_PATH=/opt/encina/lib export LD_LIBRARY_PATH
To compile an ENCINA program on SINIX which uses the MQI:
LD_RUN_PATH=/opt/encina/lib export LD_RUN_PATH cc -o amqsxaex -I/opt/encina/include amqsxaex.c -lmqm -lmqmcs \ -lmqmcs -lmqmzse -lnsl -lsocket -lencina -ldl -lmproc -lext
For DC/OSx, include -liconv on the above command line.