|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Compiling problem on AIX |
« View previous topic :: View next topic » |
Author |
Message
|
wildtiger |
Posted: Wed Jun 12, 2002 10:36 am Post subject: Compiling problem on AIX |
|
|
 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 |
|
 |
bower5932 |
Posted: Wed Jun 12, 2002 1:00 pm Post subject: |
|
|
 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 |
|
 |
wildtiger |
Posted: Wed Jun 12, 2002 3:03 pm Post subject: Does that mean that there must be a mqm.a under mqlib dir? |
|
|
 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 |
|
 |
RogerLacroix |
Posted: Wed Jun 12, 2002 8:14 pm Post subject: |
|
|
 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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|