Author |
Message
|
n0ahz0rk |
Posted: Sun Jun 10, 2007 3:34 pm Post subject: Compiling programs for Websphere MQ using cygwin |
|
|
 Novice
Joined: 08 Sep 2004 Posts: 12
|
Hi,
I've searched the forums here, but haven't found anything to confirm if I can build and run c programs using MQ Client on windows under a cygwin environment.
Has anyone done this ?
I have a program currently running on AIX 5.1 using MQ Client libraries, which I'd like to run on windows under cygwin.
I can compile & link my program if I copy over the include ( WebSphere MQ\Tools\c\include) & lib ( WebSphere MQ\Tools\Lib ) files from my windows server install into my cygwin ( /usr/mqm/include and /usr/mqm/lib respectively). The problem is at runtime, I don't know where to put my channel table, and the program reports a 2058 error.
Any ideas welcome... thanks in advance.
Noah. |
|
Back to top |
|
 |
Vitor |
Posted: Sun Jun 10, 2007 11:48 pm Post subject: Re: Compiling programs for Websphere MQ using cygwin |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
n0ahz0rk wrote: |
The problem is at runtime, I don't know where to put my channel table, and the program reports a 2058 error.
|
The location of the channel table is controled by an environment variable MQCHLLIB (and its name by MQCHLTAB). Without these the default location is the root of the MQ install.
The Clients manual describes this in greater detail. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
n0ahz0rk |
Posted: Mon Jun 11, 2007 2:24 am Post subject: Re: Compiling programs for Websphere MQ using cygwin |
|
|
 Novice
Joined: 08 Sep 2004 Posts: 12
|
Vitor wrote: |
Without these the default location is the root of the MQ install.
|
Thanks for the reply, the thing is, I haven't 'installed' MQ under my cygwin environment at all... I just copied in the include and lib files to enable the build. |
|
Back to top |
|
 |
n0ahz0rk |
Posted: Mon Jun 11, 2007 2:27 am Post subject: |
|
|
 Novice
Joined: 08 Sep 2004 Posts: 12
|
OK... so when I put my channel table under the "c:\program files\IBM\Websphere MQ" directory, it works.... thanks Vitor! |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 11, 2007 2:28 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
If you want a program to achieve client access to the queue manager, you need to install the client product (which is free of license).
You might be able to mug it up using the libs, but you could get any kind of problem & the configuration would be unsupported. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 11, 2007 2:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ok, so mugging it up is easier than I led you to believe.....
You should still do a proper client installation before your luck changes...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Jun 11, 2007 8:37 am Post subject: Re: Compiling programs for Websphere MQ using cygwin |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
n0ahz0rk wrote: |
I've searched the forums here, but haven't found anything to confirm if I can build and run c programs using MQ Client on windows under a cygwin environment. |
Do not do this!! You are creating a complete mess that will NOT be supported by IBM.
Just because you can strap 2 rockets to your car doesn't mean you should!! (Useless you want to win a Darwin award.)
First off, do as Vitor says:
Vitor wrote: |
If you want a program to achieve client access to the queue manager, you need to install the client product (which is free of license). |
Secondly, go get the FREE Microsoft Windows 'C' compiler that IS supported by IBM and compile and link your program as a native Win32 application.
I am sure that your managers / directors will be happy to have a straightforward fully supported (and free) environment than some convoluted unsupported mess.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
n0ahz0rk |
Posted: Wed Sep 05, 2007 3:09 am Post subject: Re: Compiling programs for Websphere MQ using cygwin |
|
|
 Novice
Joined: 08 Sep 2004 Posts: 12
|
RogerLacroix wrote: |
Do not do this!! You are creating a complete mess that will NOT be supported by IBM.
Just because you can strap 2 rockets to your car doesn't mean you should!! (Useless you want to win a Darwin award.)
First off, do as Vitor says:
Vitor wrote: |
If you want a program to achieve client access to the queue manager, you need to install the client product (which is free of license). |
Secondly, go get the FREE Microsoft Windows 'C' compiler that IS supported by IBM and compile and link your program as a native Win32 application.
|
Aaahh, yes - it must be nice to live in Utopia.
Where is your spirit of adventure... ever heard of thinking outside the square ?
If the FREE Microsoft Windows 'C' compiler supported the unix fork command then that would have been a good option. Unfortunately it does not, so I was looking for a solution to port my app off the Unix environment. Thanks for the comments anyway! |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Sep 05, 2007 3:14 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Did you ever consider that it was more than just a whim that the Microsoft compiler does not support 'fork'?
There's a difference, btw, between 'thinking outside the square' and 'digging your own grave'.
If you don't want to use the Microsoft compiler on the Microsoft platform... then you can consider using MinGW. Roger at least has had success with it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 05, 2007 3:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Out of curiosity... Why do you need the fork command? What is the particular requirement you are trying to satisfy with it?
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 05, 2007 3:18 am Post subject: Re: Compiling programs for Websphere MQ using cygwin |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
n0ahz0rk wrote: |
[Where is your spirit of adventure... ever heard of thinking outside the square ?
|
You'd be amazed how many managers either like living inside the square, or actively consider the space outside the square to be a cursed hell reserved for heretics & the depraved into which their beautiful, revenue generating, business supporting, SLA constrainted systems will not be put.
As to a spirit of adventure, the most daring and innovative these people get is doing a project plan that includes a full set of testing, matching it against a budget that supports it all and then sticking to it.
But all of these people sign my invoices, and all of them get very funny experession when their systems stop working. Or the phrase "unsupported" is used in the sentence as their beautiful systems. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed Sep 05, 2007 8:21 am Post subject: Re: Compiling programs for Websphere MQ using cygwin |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
n0ahz0rk wrote: |
Aaahh, yes - it must be nice to live in Utopia.
Where is your spirit of adventure... ever heard of thinking outside the square ? |
Sarcasm will get you nowhere. I think outside the everyday and if you bothered to lookup me (aka Capitalware) you would have noticed the many different products that I have created and still creating.
When I go outside to play, I play in a field and not in the middle of a 10-lane highway! Doing something stupid or unsupportable, does NOT mean you are thinking outside the box.
n0ahz0rk wrote: |
If the FREE Microsoft Windows 'C' compiler supported the unix fork command then that would have been a good option. Unfortunately it does not, so I was looking for a solution to port my app off the Unix environment. Thanks for the comments anyway! |
What makes you think that a feature / function on Unix/Linux is available in a different Operating System?
Obviously, you have not read anything related porting applications from Unix/Linux to Windows.
You can download gcc or cygwin or MinGW or lcc-win32 or open-watcom or any other free or commercial compiler / linker for Windows and you WILL still have the same issue with fork.
I will leave it to you to go and buy a book on 'Porting applications from Unix/Linux to Windows', as there will be a whole chapter on fork and related API calls.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|