Preparing C programs in Solaris

Precompiled C programs are supplied in the MQ_INSTALLATION_PATH/samp/bin directory.

MQ_INSTALLATION_PATH represents the high-level directory in which WebSphere MQ is installed.

For further information about programming 64 bit applications, see Coding standards on 64-bit platforms.

If you want to use the programs on a machine that has only the WebSphere® MQ MQI client for Solaris installed, compile the programs to link them with the client library (-lmqic).

If you use the unsupported compiler ?usr?ucb?cc, your application might compile and link successfully. However, when you run the application, it fails when it attempts to connect to the queue manager.

Note: 32 bit Solaris x86 SSL and TLS clients configured for FIPS 140-2 compliant operation fail when running on Intel systems. This failure occurs because the FIPS 140-2 compliant GSKit-Crypto Solaris x86 32 bit library file does not load on the Intel chipset. On affected systems, error AMQ9655 is reported in the client error log. To resolve this issue, disable FIPS 140-2 compliance or recompile the client application 64 bit, because 64 bit code is not affected.

Linking libraries

You must link with the WebSphere MQ libraries that are appropriate for your application type:

Library files Program/exit type
libmqm.so Server for C
libmqic.so & libmqm.so Client for C
Note:
  1. If you are writing an installable service (for further information, see the Administering ), link to the libmqmzf.so library.
  2. If you are producing an application for external coordination by an XA-compliant transaction manager such as IBM® TXSeries® Encina, or BEA Tuxedo, you must link to the libmqmxa.so (or libmqmxa64.so if your transaction manager treats the 'long' type as 64 bit) and libmqz.so libraries.
  3. You must link WebSphere MQ libraries before any other product libraries.