[AIX]

Building C++ programs on AIX

Build IBM® MQ C++ programs on AIX® by using the IBM XL C/C++ for AIX compiler.

[Deprecated][MQ 9.4.0 Jun 2024]Support for the XL C/C++ for AIX 16 compiler was deprecated in IBM MQ 9.4.0 (for Long Term Support releases, and IBM MQ 9.3.5 for Continuous Delivery releases). This compiler was superseded by the IBM Open XL C/C++ for AIX 17 compiler. For information about the different mapping of compiler options between these compiler versions, see Mapping of options in the Open XL C/C++ for AIX documentation.

[Removed][MQ 9.4.2 Feb 2025]The XL C/C++ for AIX 16 compiler on AIX was removed in IBM MQ 9.4.2.

Client

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

[MQ 9.4.0 Jun 2024]These command examples use the IBM Open XL C/C++ for AIX 17 compiler:
[MQ 9.4.0 Jun 2024]32-bit unthreaded application
ibm-clang++_r -o imqsputc_32 imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib -limqc23ca -limqb23ca -lmqic
[MQ 9.4.0 Jun 2024]32-bit threaded application
ibm-clang++_r -o imqsputc_32_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib -limqc23ca_r -limqb23ca_r -lmqic_r
[MQ 9.4.0 Jun 2024]64-bit unthreaded application
ibm-clang++_r -m64 -o imqsputc_64 imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib64 -limqc23ca -limqb23ca -lmqic
[MQ 9.4.0 Jun 2024]64-bit threaded application
ibm-clang++_r -m64 -o imqsputc_64_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib64 -limqc23ca_r -limqb23ca_r -lmqic_r
These command examples use the IBM XL C/C++ for AIX 16 compiler:
32-bit unthreaded application
xlC -o imqsputc_32 imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib -limqc23ia -limqb23ia -lmqic
32-bit threaded application
xlC_r -o imqsputc_32_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib -limqc23ia_r -limqb23ia_r -lmqic_r
64-bit unthreaded application
xlC -q64 -o imqsputc_64 imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib64 -limqc23ia -limqb23ia -lmqic
64-bit threaded application
xlC_r -q64 -o imqsputc_64_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib64 -limqc23ia_r -limqb23ia_r -lmqic_r

Server

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

[MQ 9.4.0 Jun 2024]These command examples use the IBM Open XL C/C++ for AIX 17 compiler:
[MQ 9.4.0 Jun 2024]32-bit unthreaded application
ibm-clang++_r -o imqsput_32 imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib -limqs23ca -limqb23ca -lmqm
[MQ 9.4.0 Jun 2024]32-bit threaded application
ibm-clang++_r -o imqsput_32_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib -limqs23ca_r -limqb23ca_r -lmqm_r
[MQ 9.4.0 Jun 2024]64-bit unthreaded application
ibm-clang++_r -m64 -o imqsput_64 imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib64 -limqs23ca -limqb23ca -lmqm
[MQ 9.4.0 Jun 2024]64-bit threaded application
ibm-clang++_r -m64 -o imqsput_64_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc 
-L MQ_INSTALLATION_PATH/lib64 -limqs23ca_r -limqb23ca_r -lmqm_r
These command examples use the IBM XL C/C++ for AIX 16 compiler:
32-bit unthreaded application
xlC -o imqsput_32 imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib -limqs23ia -limqb23ia -lmqm
32-bit threaded application
xlC_r -o imqsput_32_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib -limqs23ia_r -limqb23ia_r -lmqm_r
64-bit unthreaded application
xlC -q64 -o imqsput_64 imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib64 -limqs23ia -limqb23ia -lmqm
64-bit threaded application
xlC_r -q64 -o imqsput_64_r imqsput.cpp -I MQ_INSTALLATION_PATH/inc
-L MQ_INSTALLATION_PATH/lib64 -limqs23ia_r -limqb23ia_r -lmqm_r