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 » error in MQ C API while linking

Post new topic  Reply to topic
 error in MQ C API while linking « View previous topic :: View next topic » 
Author Message
its4santosh
PostPosted: Thu Oct 09, 2008 2:55 am    Post subject: error in MQ C API while linking Reply with quote

Newbie

Joined: 16 Jun 2006
Posts: 3

Hi All,

While execting a simple C program using MQ API, i am getting the following error.

Error 42: Symbol Undefined _MQDISC
MQI_Conn.obj(MQI_Conn)
Error 42: Symbol Undefined _MQCLOSE
MQI_Conn.obj(MQI_Conn)
Error 42: Symbol Undefined _MQPUT
MQI_Conn.obj(MQI_Conn)
Error 42: Symbol Undefined _MQOPEN
MQI_Conn.obj(MQI_Conn)
Error 42: Symbol Undefined _MQCONN

It's compiling without any error.
I have also updated the lib path as "C:\Program Files\IBM\WebSphere MQ\tools\lib".

Can anybody please suggest what can be the error for this.

Thanks in Advance
Back to top
View user's profile Send private message
bower5932
PostPosted: Thu Oct 09, 2008 6:55 am    Post subject: Reply with quote

Jedi Knight

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

This is a command file that I use to compile:
Code:
cl -MT -Z7 -c -W1 -D_X86=1 -DWIN32 %1.c
link -OUT:%1.exe %1.obj c:\wmq\tools\lib\mqm.lib
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
its4santosh
PostPosted: Tue Oct 14, 2008 1:13 am    Post subject: Reply with quote

Newbie

Joined: 16 Jun 2006
Posts: 3

bower5932 wrote:
This is a command file that I use to compile:
Code:
cl -MT -Z7 -c -W1 -D_X86=1 -DWIN32 %1.c
link -OUT:%1.exe %1.obj c:\wmq\tools\lib\mqm.lib


Its not working ......
I have used the path "C:\Program Files\IBM\WebSphere MQ\tools\lib"
is there any other way to provide library path.
Back to top
View user's profile Send private message
gbaddeley
PostPosted: Tue Oct 14, 2008 4:20 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

its4santosh wrote:
bower5932 wrote:
This is a command file that I use to compile:
Code:
cl -MT -Z7 -c -W1 -D_X86=1 -DWIN32 %1.c
link -OUT:%1.exe %1.obj c:\wmq\tools\lib\mqm.lib


Its not working ......
I have used the path "C:\Program Files\IBM\WebSphere MQ\tools\lib"
is there any other way to provide library path.


Drop the "c:\wmq\tools\lib\mqm.lib" and just use "mqm.lib" (for MQ server bindings), eg.
link /out:yourprog.exe yourprog.obj mqm.lib

link searches the LIB environment variable. It needs to contain C:\Program Files\IBM\WebSphere MQ\tools\lib, eg.

LIB=c:\program files\devstudio\vc\lib;c:\program files\devstudio\vc\mfc\lib;C:\Program Files\IBM\WebSphere MQ\tools\lib
_________________
Glenn
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » error in MQ C API while linking
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.