|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[C++ / UNIX] |
« View previous topic :: View next topic » |
Author |
Message
|
Amazone |
Posted: Thu Jun 01, 2006 2:48 am Post subject: [C++ / UNIX] |
|
|
Novice
Joined: 17 Oct 2005 Posts: 14
|
Hi,
I want to make read message on a wmq queue.
I use C++ on an Unix (SunOS) machine, and MQ Series client 5.3.0.12 .
MQ Series Client is installed in /produits/MQClient.5.3/
I want to compile a sample (amqsget0.c), but it does not work.
I use this command :
Code: |
gcc -o amqsget0 amqsget0.c -I/produits/MQClient.5.3/inc/ |
and i got this error :
Code: |
Undefined first referenced
symbol in file
MQGET /var/tmp//ccDqth5W.o
MQCLOSE /var/tmp//ccDqth5W.o
MQCONN /var/tmp//ccDqth5W.o
MQDISC /var/tmp//ccDqth5W.o
MQOPEN /var/tmp//ccDqth5W.o
ld: fatal: Symbol referencing errors. No output written to amqsget0
collect2: ld returned 1 exit status |
How can i do ? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 01, 2006 3:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Looks like the MQ client libraries aren't being supplied to the link step to me.....
Not used SunOS (and perhaps someone who has will kindly correct me) but I think as well as the include libraries on the -I switch, you need something like (and again I stress like):
Quote: |
-limqb23as -limqc23as etc etc etc |
The "Using C++" manual / information center section will provide more authoriative information. I commend it to you. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Amazone |
Posted: Thu Jun 01, 2006 3:36 am Post subject: |
|
|
Novice
Joined: 17 Oct 2005 Posts: 14
|
well done!
i've found a solution on :
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp?topic=/com.ibm.mq.amqzan.doc/amq5421.htm
it makes :
Code: |
gcc -o amqsget0 amqsget0.c -I/produits/MQClient.5.3/inc -L/produits/MQClient.5.3/lib -R/produits/MQClient.5.3/lib -R/usr/lib/32 -limqc23as -limqb23as -lmqic -lmqmcs -lmqmzse -lsocket -lnsl -ldl |
But, when i want to compile imqsget.cpp... i've this
Code: |
Undefined first referenced
symbol in file
operator new(unsigned) /var/tmp//ccbkVNbP.o
ImqChl::setTransportType(long) /var/tmp//ccbkVNbP.o
ImqMgr::disconnect() /var/tmp//ccbkVNbP.o
ImqStr::cutOut(ImqStr&, char) /var/tmp//ccbkVNbP.o
ImqObj::setName(char const*) /var/tmp//ccbkVNbP.o
ImqObj::setConnectionReference(ImqMgr*) /var/tmp//ccbkVNbP.o
ImqGmo3::ImqGmo3[in-charge]() /var/tmp//ccbkVNbP.o
ImqGmo3::~ImqGmo3 [in-charge]() /var/tmp//ccbkVNbP.o
ImqMtr::setMessageId(unsigned char const*)/var/tmp//ccbkVNbP.o
ImqMgr::setChannelReference(ImqChl*) /var/tmp//ccbkVNbP.o
ImqQue::get(ImqMsg&, ImqGmo3&) /var/tmp//ccbkVNbP.o
ImqStr::ImqStr[in-charge]() /var/tmp//ccbkVNbP.o
ImqStr::~ImqStr [in-charge]() /var/tmp//ccbkVNbP.o
ImqStr::upperCase() const /var/tmp//ccbkVNbP.o
operator delete(void*) /var/tmp//ccbkVNbP.o
ImqChl::ImqChl[in-charge]() /var/tmp//ccbkVNbP.o
ImqQue::ImqQue[in-charge]() /var/tmp//ccbkVNbP.o
ImqQue::~ImqQue [in-charge]() /var/tmp//ccbkVNbP.o
ImqMgr::connect() /var/tmp//ccbkVNbP.o
ImqChl::setChannelName(char const*) /var/tmp//ccbkVNbP.o
ImqCac::useEmptyBuffer(char const*, unsigned)/var/tmp//ccbkVNbP.o
ImqObj::setOpenOptions(long) /var/tmp//ccbkVNbP.o
ImqObj::open() /var/tmp//ccbkVNbP.o
ImqChl::setConnectionName(char const*)/var/tmp//ccbkVNbP.o
ImqMsg::ImqMsg[in-charge]() /var/tmp//ccbkVNbP.o
ImqMsg::~ImqMsg [in-charge]() /var/tmp//ccbkVNbP.o
ImqObj::close() /var/tmp//ccbkVNbP.o
__gxx_personality_v0 /var/tmp//ccbkVNbP.o
ImqMgr::ImqMgr[in-charge]() /var/tmp//ccbkVNbP.o
ImqMgr::~ImqMgr [in-charge]() /var/tmp//ccbkVNbP.o
ImqStr::ImqStr[in-charge](char const*)/var/tmp//ccbkVNbP.o
ImqMsg::formatIs(char const*) const /var/tmp//ccbkVNbP.o
ImqChl::setHeartBeatInterval(long) /var/tmp//ccbkVNbP.o
ImqCac::dataLength() const /var/tmp//ccbkVNbP.o
ImqStr::compare(ImqStr const&) const/var/tmp//ccbkVNbP.o
ImqMtr::setCorrelationId(unsigned char const*)/var/tmp//ccbkVNbP.o
ld: fatal: Symbol referencing errors. No output written to imqsget |
an idea ? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jun 01, 2006 3:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Well the names of the missing symbols are the C++ class names. amqsget is actually a C program that uses the MQI directly (MQOPEN et al) rather than the classes.
I notice in your list of things undefined are the opperators "new" & "delete", which are C++ keyword. At the risk of sounding stupid (a risk I'm quite used to ) are you sure this is a C++ compilation, you don't need another flag or something (as I said, not familiar with the platform).
Failing that, I would imagine you're either 1 library or some prototypes short. Do other C++ (non-MQ) compile and link ok? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Amazone |
Posted: Thu Jun 01, 2006 4:11 am Post subject: |
|
|
Novice
Joined: 17 Oct 2005 Posts: 14
|
humm
Well, i'm not familiar with this platform...
I use to work on a microsoft platform in .Net...
I acknowledge that it's over my control
i'll try to use the first sample
thanks for your help |
|
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
|
|
|
|