|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
AIX C/C++ Compiler problem (urgent) |
« View previous topic :: View next topic » |
Author |
Message
|
wildtiger |
Posted: Wed Jun 12, 2002 10:42 am Post subject: AIX C/C++ Compiler problem (urgent) |
|
|
 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 12:37 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
|
Back to top |
|
 |
solberj |
Posted: Wed Jun 12, 2002 12:39 pm Post subject: |
|
|
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 |
|
 |
RogerLacroix |
Posted: Wed Jun 12, 2002 8:07 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
|
|
|
|