Building C++ programs on Windows
Build IBM® MQ C++ programs on Windows by using the Microsoft Visual Studio C++ compiler.
import libraries
" that you can use during compilation
time only. For runtime, you must use the dynamic libraries.From Version 8.0.0, Fix Pack 4, IBM MQ ships redistributable clients, containing libraries required for running IBM MQ applications. These libraries can be packaged and redistributed with client applications. For more information, see Redistributable clients on Windows.
Library (.lib) files and dll files for use with 32-bit applications are installed in MQ_INSTALLATION_PATH
/Tools/Lib, files for use
with 64-bit applications are installed in MQ_INSTALLATION_PATH
/Tools/Lib64. MQ_INSTALLATION_PATH
represents the high-level directory in which IBM MQ is
installed.
Client
cl -MD imqsput.cpp /Feimqsputc.exe imqb23vn.lib imqc23vn.lib
Server
cl -MD imqsput.cpp /Feimqsput.exe imqb23vn.lib imqs23vn.lib
C++ client libraries built by using Microsoft Visual Studio 2005 compiler
From Version 8.0.0, Fix Pack 2, IBM MQ provides C++ client libraries that are built with the Microsoft Visual Studio 2005 C++ compiler. Applications that are built by using a release of IBM MQ earlier than Version 8.0 can use these libraries. These libraries are provided in addition to the existing IBM MQ 8.0 C++ libraries that are built with the Microsoft Visual Studio 2012 C++ compiler.
- For 32-bit applications:
SET PATH=<install folder>\bin\vs2005
- For 64-bit applications:
SET PATH=<install folder>\bin64\vs2005
Using differently named IBM MQ C++ libraries
From Version 8.0.0, Fix Pack 4, IBM MQ provides some additional C++ client libraries that are named differently. These libraries are built with the Microsoft Visual Studio 2012 C++ compiler. These libraries are provided in addition to the existing IBM MQ 8.0 C++ libraries that are built with the Microsoft Visual Studio 2012 C++ compiler. Since these additional IBM MQ C++ libraries have different names, you can run IBM MQ C++ applications built by using IBM MQ C++ and compiled with Microsoft Visual Studio 2012 and Microsoft Visual Studio 2005 on the same machine.
- imqb23vnvs2012.dll
- imqc23vnvs2012.dll
- imqs23vnvs2012.dll
- imqx23vnvs2012.dll
- For 32-bit applications:
SET PATH=<install folder>\bin\vs2005;%PATH%
- For 64-bit applications:
SET PATH=<install folder>\bin64\vs2005;%PATH%