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 problem on AIX

Post new topic  Reply to topic
 Compiling problem on AIX « View previous topic :: View next topic » 
Author Message
wildtiger
PostPosted: Wed Jun 12, 2002 10:36 am    Post subject: Compiling problem on AIX 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 1:00 pm    Post subject: Reply with quote

Jedi Knight

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

I believe that L indicates the location of the libraries and that l indicates the library. Try:

cc t1.c -o t1 -Iinclude Lmqlib -lmqm
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
wildtiger
PostPosted: Wed Jun 12, 2002 3:03 pm    Post subject: Does that mean that there must be a mqm.a under mqlib dir? Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

Does that mean that there must be a mqm.a under mqlib subdirectory?
I only have some files like libmqm*.a under mqlib subdirectory under current directory.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Jun 12, 2002 8:14 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
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 » IBM MQ API Support » Compiling problem 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.