MQ

MQ

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Error creating a c++ client for MQ V9

    Posted Tue September 06, 2016 05:25 AM

    I am triying to create a client in c++ to send messages to a Queue manager with MS Visual Studio2013

    I installed the developer tools and set up a Queue manager with a queue.

    I compiled and run the hello world sample and everytime i try to connect to the queuemanager i get the error 2012 aka enviremental error. And don´t know what to do.

     



  • 2.  RE: Error creating a c++ client for MQ V9

    Posted Wed September 07, 2016 10:28 PM

    You can look up what the MQ reason codes mean in Knowledge Center. Here's the link for MQRC_ENVIRONMENT_ERROR (2012). As you can see there are a number of possibilities.

    It's hard to say which it might be without knowing more about your code and your build environment. If nothing seems like a possibility from the list at that link, can you perhaps provide more details about both?



  • 3.  RE: Error creating a c++ client for MQ V9

    Posted Thu September 08, 2016 03:22 AM

    Hi Morag,

    thanks for the reply. I found the list of reason codes earlier but i couldn´t figure out what the problem is on my own and the code is not very specific.

    I am trying to run the hello world sample, compile in MS Visual Studio 2013 64bit mode. Linked with imqbv23vn.lib and imqc23vn.lib and made another attemp with imqb23vnvs2012.lib and imqc23vnvs2012.lib.

    I don´t do specific calls. Just use the ImqQueueManager connect() function. Then i always get the 2012 MQRC_ENVIRONMENT_ERROR.

     

    Further i can connect to my test qmanager with  the amqscnxc.exe...



  • 4.  RE: Error creating a c++ client for MQ V9

    Posted Thu September 08, 2016 07:41 PM

    Looking at the pre-requisites for IBM MQ V8 and V9, I can see that while Microsoft Visual Studio 2013 is supported for IBM MQ at those versions, it is only supported for the C API and not for C++ classes. The C++ classes require you to use Microsoft Vidsual Studio 2012. (C++ binary compatibility is picky which is why there are MS VS 2005 - imqb23vn.lib - and MS VS 2012 - imqb23vnvs2012.dll - versions of them).

    The pre-requisite report has a "Supported Software section", and within that a table for "Compilers and Languages" which shows that MS VS 2013 is not supported for building MQ C++ applications.

    Start with the links below, click on Windows, then when the report is created, go to the sections I mentioned above.

    It is very common for people who want to write C++ applications to actually use the C API rather than the C++ classes. It is supported to call the C API from a C++ application. You might want to consider this. There are many benefits. It's much more flexible than the C++ classes API for MQ and also the C++ classes API has been stabilised whereas the C API will continue to be developed.

    Cheers
    Morag



  • 5.  RE: Error creating a c++ client for MQ V9

    Posted Fri September 09, 2016 02:24 AM

    ah thank you very much.

    i found a similar site for V7.5 but nothing for the newer versions.

    Lets see what i can do.



  • 6.  RE: Error creating a c++ client for MQ V9

    Posted Fri September 09, 2016 02:43 AM

    Yes, it is a shame that they don't link all the versions together in some way.

    Google is your friend to find these things. "IBM MQ Vn prerequisites" is how I find them.