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 » General IBM MQ Support » AIX C/C++ Compiler problem (urgent)

Post new topic  Reply to topic
 AIX C/C++ Compiler problem (urgent) « View previous topic :: View next topic » 
Author Message
wildtiger
PostPosted: Wed Jun 12, 2002 10:42 am    Post subject: AIX C/C++ Compiler problem (urgent) Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

Hi, I am compiling a MQ C sample program on AIX. I don't know how to write the command line. I did the following line:

cc t1.c -o t1 -Iinclude -Lmqlib

and I got the following error messages:

ld: 0711-317 ERROR: Undefined symbol: .MQCONN
ld: 0711-317 ERROR: Undefined symbol: .MQOPEN
ld: 0711-317 ERROR: Undefined symbol: .MQPUT
ld: 0711-317 ERROR: Undefined symbol: .MQCLOSE
ld: 0711-317 ERROR: Undefined symbol: .MQDISC
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

I put all the .h file under include subdirectory and all the .a file under mqlib subdirectory. I'm not farmiliar with AIX C/C++ compilier. Can anyone tell me the correct command to compile it?

Thanks in advance,
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Jun 12, 2002 12:37 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

You might want to take a look at Chapter 19 of the Application Programming Guide. It gives details on building MQ programs on AIX.

You can find the MQSeries manuals at: http://www-3.ibm.com/software/ts/mqseries/library/manualsa/index.html
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
solberj
PostPosted: Wed Jun 12, 2002 12:39 pm    Post subject: Reply with quote

Novice

Joined: 18 Mar 2002
Posts: 18
Location: Jim Solberg

Wildtiger:

This was cut and pasted from the MQSeries Application Programming Guide (chapter 19). Your post indicated that this is a sample program...did you mean one of the samples provided by IBM??? If so, this may help.

begin paste
--------------------------------

Precompiled C programs are supplied in the /usr/mqm/samp/bin directory. Use the ANSI compiler and run the following command:

$ cc -o <amqsput> <amqsput>.c -lmqm

where amqsput is a sample program.

---------------------------------
end paste

Regards,
_________________
Jim Solberg
Senior System Architect - Technology Services
Conseco Finance Corporation
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Wed Jun 12, 2002 8:07 pm    Post subject: Reply with quote

Jedi Knight

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

Hi,

Here's a makefile that I used on AIX to compile/link my 'C' program with MQ calls:
Code:
#
# Name       : testpgm.mak
# Title      : Make file for testpgm
#
MQM = /usr/lpp/mqm
MQMLib = $(MQM)/lib
LibList = -lc $(MQMLib)/libmqm.a
LoadMap = -bloadmap:loadmap
MQMInc = $(MQM)/inc
IncList = -I$(MQMInc) -I/usr/lpp/xlc/include -I/usr/include -I/usr/include/sys
xlcOpts = -c -qchars=signed -M -g -qdbxextra -qcpluscmt -DUNIX
Compile = xlc $(xlcOpts) $(IncList)
Link = xlc

all       :  testpgm
testpgm   :  testpgm.o
   $(Link) -o testpgm $(LoadMap) $(LibList) testpgm.o
testpgm.o :  testpgm.c
   $(Compile) testpgm.c


Hope that helps.

later
Roger...
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 » General IBM MQ Support » AIX C/C++ Compiler problem (urgent)
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.