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 MQ Code in C

Post new topic  Reply to topic
 Compiling MQ Code in C « View previous topic :: View next topic » 
Author Message
MQWays
PostPosted: Wed Apr 30, 2008 3:26 am    Post subject: Compiling MQ Code in C Reply with quote

Acolyte

Joined: 20 Jan 2008
Posts: 61

I am new to writing MQ Code in C on Linux. I am trying to do a 'gcc' on the C program and it returns the following:

:undefined reference to 'main'
/tmp/cchvNJQe.o(.text+0x6f3): In function 'PutAfter':
:undefined reference to 'MQPUT'
/tmp/cchvNJQe.o(.text+0xab8): In function 'Put1After':
and many similar lines......

Am I missing any library required for the compilation. Please assist.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 30, 2008 3:39 am    Post subject: Re: Compiling MQ Code in C Reply with quote

Grand High Poobah

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

MQWays wrote:
I am new to writing MQ Code in C on Linux. I am trying to do a 'gcc' on the C program and it returns the following:


There are instructions on compilation & linking (which varies according to client or sever side requirements) in the APG.

A search on gcc within the forum may also throw up useful tips.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Apr 30, 2008 3:40 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

did you include cmqc.h header

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 30, 2008 3:43 am    Post subject: Reply with quote

Grand High Poobah

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

Moved to non-Java forum
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
MQWays
PostPosted: Wed Apr 30, 2008 3:44 am    Post subject: Reply with quote

Acolyte

Joined: 20 Jan 2008
Posts: 61

I am modifying the mirrorq utility. I am sure everything is already in place. My environment probably needs to be set for compilation.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 30, 2008 3:49 am    Post subject: Reply with quote

Grand High Poobah

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

MQWays wrote:
I am modifying the mirrorq utility.


It's not a utility, it's a sample exit. As some of the discussions on mirrorq in here have aluded to, in it's current form it's not considered production strength.

If you're new to C code (in this environment or generally) I urge you to be cautious and extensively. A badly coded/compiled/linked exit (which has different rules to an app) can at best kill the performance of the queue manager and at worst bring the queue manager down in flames.

Exits are an advanced topic, and you would be well advised to review some of the material in the forum. There's a good thread somewhere from Roger about writing & compiling exits, and avoiding some of the pitfalls. Mirrorq has also been the subject of discussion.

Caution & testing, caution & testing.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Apr 30, 2008 7:12 pm    Post subject: Reply with quote

Jedi Knight

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

Hi,
Vitor wrote:
There's a good thread somewhere from Roger about writing & compiling exits, and avoiding some of the pitfalls.

That would be this posting:
http://www.mqseries.net/phpBB2/viewtopic.php?t=20523

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
tleichen
PostPosted: Thu May 01, 2008 5:56 am    Post subject: Reply with quote

Yatiri

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

Vitor wrote:
...
If you're new to C code (in this environment or generally) I urge you to be cautious and extensively. A badly coded/compiled/linked exit (which has different rules to an app) can at best kill the performance of the queue manager and at worst bring the queue manager down in flames.

Exits are an advanced topic, and you would be well advised to review some of the material in the forum. There's a good thread somewhere from Roger about writing & compiling exits, and avoiding some of the pitfalls. Mirrorq has also been the subject of discussion....
I agree. Exits ARE an advanced topic and if you are new to the programming language, please don't try to get your feet wet in programming ANY language by writing MQ exits! It WILL turn out badly!
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Compiling MQ Code in C
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.