ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Compiling mc76 on AIX

Post new topic  Reply to topic
 Compiling mc76 on AIX « View previous topic :: View next topic » 
Author Message
moe
PostPosted: Mon Feb 05, 2007 11:02 pm    Post subject: Compiling mc76 on AIX Reply with quote

Apprentice

Joined: 05 Sep 2006
Posts: 33
Location: Sydney, Australia

Hello,

I'm trying to compile the MC76 supportpac for AIX 5.2, my background with C/C++ involves learning the languages in great detail and being able to compile simple one source file projects in windows and some in linux. I've been banging away at trying to compile this supportpac for AIX 5.2 but i'm completely lost in the linking and the libraries and so on, the only compiler available is gcc which is installed.

Can you somebody please make suggestions as to what commands I should use to compile this? An explanation of what the commands do or links to tutorial websites would be greatly appreciated!
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Feb 06, 2007 1:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

The PDF included in the support pack discusses link options.

But if you're having trouble, can I recommend you get your feet wet with something other than an exit? They are not the easiest MQ code and problem exits can cause havoc...
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
moe
PostPosted: Tue Feb 06, 2007 3:07 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2006
Posts: 33
Location: Sydney, Australia

Granted the pdf does discuss link options however these are for windows implementations, I've successfully worked on applications written in java to connect to queue managers and manipulate queues in different ways however this is because I have a strongish java background and know the compilers quite well, this seems to be a bit foreign to me, my background in c++ went as far as OO techniques, dynamic memory, c & c++ interoperability etc however I never really dived into linking 3rd party libraries and never really used gcc to its full extent...any general information (doesnt have to be specific) would help, examples would be nice too.

Thanks guys...
Back to top
View user's profile Send private message
moe
PostPosted: Tue Feb 06, 2007 4:53 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2006
Posts: 33
Location: Sydney, Australia

Well i've got it compiled now using the following commands:

Code:

gcc -c exit.c
gcc -o exit exit.o /usr/mqm/lib/libmqutl_r.a -eMQStart


I'm not sure if I should include exit.exp though using the -bE:exit.exp switch:

Code:

#!
clwlFunction
MQStart


To get it to compile I had to comment out the line:

Code:

_ltoa(parms->DestinationChosen, tmpbuf, 10);


Since the above seems to be a windows specific call, a quick google search reveals that it converts the digits of a given long value to a character string.

Now that i've got it linking successfully, i'll probably go through the code and hack it up to make it work on aix, any comments would be greatly appreciated...
Back to top
View user's profile Send private message
tleichen
PostPosted: Wed Feb 07, 2007 9:55 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

moe wrote:
...To get it to compile I had to comment out the line:

Code:

_ltoa(parms->DestinationChosen, tmpbuf, 10);


Since the above seems to be a windows specific call, a quick google search reveals that it converts the digits of a given long value to a character string.

Now that i've got it linking successfully, i'll probably go through the code and hack it up to make it work on aix, any comments would be greatly appreciated...
(...sigh!)
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
moe
PostPosted: Wed Feb 07, 2007 7:57 pm    Post subject: Reply with quote

Apprentice

Joined: 05 Sep 2006
Posts: 33
Location: Sydney, Australia

Code:

gcc -g -DLINUX -DANSI_PROTOTYPES -shared -c mqFoExit.c
gcc -g -DLINUX -DANSI_PROTOTYPES -shared /usr/mqm/lib/libmqutl_r.a -e clwlFunction mqFoExit.o -o mqFoExit.so


The entry point was wrong, i've corrected that, however I dont think that ltoa function is available at all in this version of gcc (2.95.3 and 3.3.2).

tleichen: I'm sorry if i'm not as knowledgeable as you, I would appreciate if you could post a more constructive comment, thanks.

I also know the exit wont work without that line, I merely did that as a test...
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Thu Feb 08, 2007 8:52 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

First read this:
http://www.mqseries.net/phpBB2/viewtopic.php?t=20523

Second, IBM does NOT support gcc on AIX.

Third, ltoa is part of stdlib and has been around since the 80's.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Compiling mc76 on AIX
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.