|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Linking Error in MQ program in C on AIX |
« View previous topic :: View next topic » |
Author |
Message
|
Harshalw |
Posted: Tue Apr 27, 2010 1:02 am Post subject: Linking Error in MQ program in C on AIX |
|
|
Voyager
Joined: 23 Jul 2008 Posts: 77
|
Hi I have written a simple code in C for connecting to the queue manager.
It is getting compiled , however giving linking error . The error and make file content are follow
# make -f MQconn.mak
/usr/vacpp/bin/xlC_r -q64 -oMQconn.o -c MQconn.c
/usr/vacpp/bin/xlC_r -q64 -bloadmap:loadmap.out -oMQconn.exe MQconn.o
ld: 0711-317 ERROR: Undefined symbol: .MQCONN
ld: 0711-344 See the loadmap file loadmap.out for more information.
make: 1254-004 The error code from the last command is 8.
Stop.
When i check loadmap.out , it gives me
(ld): addgl /usr/lib/glink64.o
ADDGL: Glink code added for 13 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
----------------------------------------------------------------------------------------------
.MQCONN [24] ER PR MQconn.c(MQconn.o)
00000050 .text R_RBR [6] .main
ER: The return code is 8.
Below in my C file
#include <cmqc.h>
int main()
{
MQHCONN ConnH; /*Connection Handle */
MQHOBJ ObjH; /*Object Handle */
MQLONG CompCode; /* Completion code */
MQLONG Reason; /* Qualifying reason */
char QueMgr[] = "OIMDEV01";
strncpy(QMName,QueMgr,MQ_Q_MGR_NAME_LENGTH);
MQCONN(QMName,&ConnH,&CompCode,&Reason);
if(CompCode != MQCC_OK)
{
printf("\nMQCONN ended with Error cc %ld rc %ld\n", CompCode, Reason);
exit(Reason);
}
printf("\n Connected to queue manager");
}
Please le me know what can be the prolem here...
Thanks. |
|
Back to top |
|
 |
mvic |
Posted: Tue Apr 27, 2010 1:13 am Post subject: Re: Linking Error in MQ program in C on AIX |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
You need -lmqm or -lmqic
Look for the compile/link instructions in the MQ manual. |
|
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
|
|
|
|