|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQ and Eclipse Include files |
« View previous topic :: View next topic » |
Author |
Message
|
Boomn4x4 |
Posted: Mon Nov 28, 2011 8:03 am Post subject: MQ and Eclipse Include files |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
I understand that this is more appropriatly directed towards Eclipse support but I'm having trouble finding support. Hopefully someone here can relate.
I'm writing C/C++ applications to utilize MQ functionality, every thing was fine until I grew out of my previous g++ / gcc compiles with GVIM coding. So, I moved (attempted to move) my project into eclipse.
I'm having a really hard time getting the MQ functions to include into my eclipse programs. For example, I'm am creating an instance of:
ImqQueueManager manager;
I've included imqi.hpp
Eclipse seems to know the ImgQueueManager data type is there, but it doesn't know what to do with the constructor as the error eclipse is throwing is:
"undefined reference to `ImqMgr::ImqMgr()'"
Any help would be appreciated. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 28, 2011 8:17 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You should be aware that the C++ API is no longer being enhanced. That is, you may find that it lacks a significant set of functionality, particularly related to features of MQ v7.0 and later.
You need to specify the correct set of includes in your source files.
You also need to specify the correct set of includes in your project include paths and symbols. In general, you should include everything in the MQ cpp include directory. |
|
Back to top |
|
 |
Boomn4x4 |
Posted: Mon Nov 28, 2011 8:23 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
mqjeff wrote: |
You also need to specify the correct set of includes in your project include paths and symbols. In general, you should include everything in the MQ cpp include directory. |
I have included /opt/mqm/inc which has the imqi.hpp which seems to include many of the other .hpp includes. Am I not getting them all from here?
mqjeff wrote: |
You should be aware that the C++ API is no longer being enhanced. That is, you may find that it lacks a significant set of functionality, particularly related to features of MQ v7.0 and later |
That is good information to have. To take a step back, my organization has just purchased a license for MQ and we intended on using the messaging system in our application development going forward. With that being said, we have yet to have been provided with formal training on the integration of the system into our applications.
As we are so new to the project, no direction has been set in stone as to how we want to go forward, I am currently simply coding simple projects to demonstrate what we "can" do.
Do you have any advise as to what API I should go forward with? So far I have done similar projects in C and Java... C++ is where I starting to run into bumps. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Nov 28, 2011 8:29 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Both the C api and the Java api are fully functional and being maintained.
What I said about include paths holds true for C as well, in Eclipse projects. You need to alter the project preferences to indicate the MQ include path.
There is also a .NET API that is being maintained. And there is the XMS API that provides a .NET version of the JMS API. MQ also supports the JMS API.
Pretty much, of the choices available, the C++ is the only one to avoid.
Which one you choose going forward really depends on local factors. |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Nov 28, 2011 8:30 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Before any direction or strategy can be set, it is critical that you and your team need to get training on the WMQ product.
Here are some introductory WMQ courses:
IBM offers a one-day lecture course: WM100 - Technical Introduction to IBM WebSphere MQ.
IBM also offers a 4-day lecture, with hands-on lab exercises WM20 IBM WebSphere MQ System Administration - AIX, Linux, Windows.
IBM also offers a 3-day lecture, with hands-on lab exercises WM50 - IBM WebSphere MQ V7 Application Development - Windows, AIX, z/OS.
These courses are offered in-classroom and video-conference style.
Visit www.ibm.com/training/us for course descriptions and other details. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Boomn4x4 |
Posted: Fri Dec 02, 2011 6:52 am Post subject: |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
mqjeff wrote: |
Both the C api and the Java api are fully functional and being maintained.
What I said about include paths holds true for C as well, in Eclipse projects. You need to alter the project preferences to indicate the MQ include path.
There is also a .NET API that is being maintained. And there is the XMS API that provides a .NET version of the JMS API. MQ also supports the JMS API.
Pretty much, of the choices available, the C++ is the only one to avoid.
Which one you choose going forward really depends on local factors. |
I spent a day with an IBM rep yesterday, and he was surprised, and disagreed, in that C++ is no longer being maintained. He actually pushed me towards exploring the C++ option more.
Which brings me back to my original question, as I still am unable to get Eclipse to see my Objects. Eclipse doesn't seem to have a problem seeing the include, but its throwing "Undefined reference" errors for the imqi objects.
For example:
Declaration of:
ImqQueueManager manager ;
Throws:
undefined reference to `ImqMgr::ImqMgr()' cppTest.cpp /TestC++ line 15 C/C++ Problem |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Dec 02, 2011 6:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Boomn4x4 wrote: |
I spent a day with an IBM rep yesterday, and he was surprised, and disagreed, in that C++ is no longer being maintained. He actually pushed me towards exploring the C++ option more. |
Ask him to verify that with Hursley
EDIT: Better option.
Open a PMR to get confirmation yourself through official channels.
But you will learn that all of the APIs described in the Using C++ manuals are not being maintained. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 02, 2011 8:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Boomn4x4 wrote: |
I spent a day with an IBM rep yesterday, and he was surprised, and disagreed, in that C++ is no longer being maintained. He actually pushed me towards exploring the C++ option more. |
Wrong wording. I am sure IBM stays strong in its support of C++ as a language. However looking at the C++ WMQ interface, that is deprecated and obsolete and not being maintained any more...
Have you tried accessing the WMQ C interface from within your C++ program?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
markt |
Posted: Fri Dec 02, 2011 9:22 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
The MQ C++ interfaces are not being enhanced but they are being maintained. They are stabilised, but you can still raised pmrs against the existing function. |
|
Back to top |
|
 |
mvic |
Posted: Fri Dec 02, 2011 5:08 pm Post subject: Re: MQ and Eclipse Include files |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Boomn4x4 wrote: |
I'm writing C/C++ applications to utilize MQ functionality, every thing was fine until I grew out of my previous g++ / gcc compiles with GVIM coding. So, I moved (attempted to move) my project into eclipse. |
Usually the most important thing is what your team already uses.
But I can't resist asking. Are you using C++ to fit in with other stuff you already have, or is this a new thing you are doing? If it's new, and you want to work in Eclipse, wouldn't it be most natural to go to Java programming?
If you want to go C/C++, then you might be best using the MQ C APIs for MQ, which is perfectly OK to do from a C++ program.
The best thing is, you get to choose. But, of the various MQ APIs mentioned in this thread, the one that has not received updates in V7 is the MQ C++ API. If you do end up needing any features added in V7, you would need to re-write your application. |
|
Back to top |
|
 |
Boomn4x4 |
Posted: Tue Dec 06, 2011 9:44 am Post subject: Re: MQ and Eclipse Include files |
|
|
Disciple
Joined: 28 Nov 2011 Posts: 172
|
mvic wrote: |
Boomn4x4 wrote: |
I'm writing C/C++ applications to utilize MQ functionality, every thing was fine until I grew out of my previous g++ / gcc compiles with GVIM coding. So, I moved (attempted to move) my project into eclipse. |
Usually the most important thing is what your team already uses.
But I can't resist asking. Are you using C++ to fit in with other stuff you already have, or is this a new thing you are doing? If it's new, and you want to work in Eclipse, wouldn't it be most natural to go to Java programming?
If you want to go C/C++, then you might be best using the MQ C APIs for MQ, which is perfectly OK to do from a C++ program.
The best thing is, you get to choose. But, of the various MQ APIs mentioned in this thread, the one that has not received updates in V7 is the MQ C++ API. If you do end up needing any features added in V7, you would need to re-write your application. |
This is all new stuff to our organization. We are currently using an OpenEdge (Progress) application platform, to which there isn't a supported API. It is, however, able to utilize DLLs / shared object libraries to interface with MQ. This leaves me open to code in whatever language I find to be a best fit. Therefore, I have been coding in C/C++ and Java just to put some examples together to demonstrate to my managers. I am most comfortable with C++, and am most interested in "learning" java (as it has been something I have wanted to pick up for some time but haven't been presented with the opportunity to do so). The primary road block that I have experienced is that a manager in my org chart is adamantly against java. In his words, he isn't interested in having a JVM hogging up resources on "his" server. This essentially leaves me with the C/C++ option. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Dec 06, 2011 9:51 am Post subject: Re: MQ and Eclipse Include files |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Boomn4x4 wrote: |
The primary road block that I have experienced is that a manager in my org chart is adamantly against java. In his words, he isn't interested in having a JVM hogging up resources on "his" server. |
I can hear one of our regulars choking on a Singleton from here....
Boomn4x4 wrote: |
This essentially leaves me with the C/C++ option. |
IMHO the only real issue is the lack of enhancment in the v7 C++ API, which will only be a issue when (or if) you need to incorporate specific v7 enhancements; I'm thinking of message properties here. Or using pub/sub.
So you need to be prepared for the eventuality in which you need to use the C api from inside your code. But clearly not in the short to medium term. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|