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 » General IBM MQ Support » MQ using C

Post new topic  Reply to topic Goto page 1, 2  Next
 MQ using C « View previous topic :: View next topic » 
Author Message
jags1891
PostPosted: Tue May 16, 2006 6:57 am    Post subject: MQ using C Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

I am doing MQ put/Get program in C. but I am getting lots of linker errors
------ Build started: Project: MQGETPUT, Configuration: Release Win32 ------
Linking...
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: __thiscall ImqStr::ImqStr(char const *)" (??0ImqStr@@$$FQAE@PBD@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ImqStr::~ImqStr(void)" (??1ImqStr@@$$FUAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: short __thiscall ImqStr::compare(class ImqStr const &)const " (?compare@ImqStr@@$$FQBEFABV1@@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: void __thiscall ImqObj::setConnectionReference(class ImqMgr *)" (?setConnectionReference@ImqObj@@$$FQAEXPAVImqMgr@@@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: __thiscall ImqMgr::ImqMgr(void)" (??0ImqMgr@@$$FQAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: __thiscall ImqQue::ImqQue(void)" (??0ImqQue@@$$FQAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: __thiscall ImqMsg::ImqMsg(void)" (??0ImqMsg@@$$FQAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: __thiscall ImqGmo3::ImqGmo3(void)" (??0ImqGmo3@@$$FQAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ImqGmo3::~ImqGmo3(void)" (??1ImqGmo3@@$$FUAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqObj::setName(char const *)" (?setName@ImqObj@@$$FQAEEPBD@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: __thiscall ImqStr::ImqStr(void)" (??0ImqStr@@$$FQAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: static void * __cdecl ImqErr::operator new(unsigned int)" (??2ImqErr@@$$FSAPAXI@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: static void __cdecl ImqErr::operator delete(void *)" (??3ImqErr@@$$FSAXPAX@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: __thiscall ImqChl::ImqChl(void)" (??0ImqChl@@$$FQAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqChl::setHeartBeatInterval(long)" (?setHeartBeatInterval@ImqChl@@$$FQAEEJ@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall ImqStr::cutOut(class ImqStr &,char)" (?cutOut@ImqStr@@$$FQAEIAAV1@D@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqChl::setChannelName(char const *)" (?setChannelName@ImqChl@@$$FQAEEPBD@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: class ImqStr __thiscall ImqStr::upperCase(void)const " (?upperCase@ImqStr@@$$FQBE?AV1@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqChl::setTransportType(long)" (?setTransportType@ImqChl@@$$FQAEEJ@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqChl::setConnectionName(char const *)" (?setConnectionName@ImqChl@@$$FQAEEPBD@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqMgr::setChannelReference(class ImqChl *)" (?setChannelReference@ImqMgr@@$$FQAEEPAVImqChl@@@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqMgr::connect(void)" (?connect@ImqMgr@@$$FQAEEXZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqObj::setOpenOptions(long)" (?setOpenOptions@ImqObj@@$$FQAEEJ@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqObj::open(void)" (?open@ImqObj@@$$FQAEEXZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqCac::useEmptyBuffer(char const *,unsigned int)" (?useEmptyBuffer@ImqCac@@$$FQAEEPBDI@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: void __thiscall ImqMtr::setMessageId(unsigned char const *)" (?setMessageId@ImqMtr@@$$FQAEXPBE@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: void __thiscall ImqMtr::setCorrelationId(unsigned char const *)" (?setCorrelationId@ImqMtr@@$$FQAEXPBE@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqQue::get(class ImqMsg &,class ImqGmo3 &)" (?get@ImqQue@@$$FQAEEAAVImqMsg@@AAVImqGmo3@@@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqMsg::formatIs(char const *)const " (?formatIs@ImqMsg@@$$FQBEEPBD@Z)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned int __thiscall ImqCac::dataLength(void)const " (?dataLength@ImqCac@@$$FQBEIXZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqObj::close(void)" (?close@ImqObj@@$$FQAEEXZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: unsigned char __thiscall ImqMgr::disconnect(void)" (?disconnect@ImqMgr@@$$FQAEEXZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ImqMgr::~ImqMgr(void)" (??1ImqMgr@@$$FUAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ImqErr::~ImqErr(void)" (??1ImqErr@@$$FUAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ImqQue::~ImqQue(void)" (??1ImqQue@@$$FUAE@XZ)
MQGETPUT.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ImqMsg::~ImqMsg(void)" (??1ImqMsg@@$$FUAE@XZ)
C:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\MQGETPUT\Release\MQGETPUT.exe : fatal error LNK1120: 36 unresolved externals
Build log was saved at "file://c:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\MQGETPUT\MQGETPUT\Release\BuildLog.htm"
MQGETPUT - 37 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ====

please anyone tell me, which libs i have to link to
Back to top
View user's profile Send private message
fschofer
PostPosted: Tue May 16, 2006 7:01 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,
look here

http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzal.doc/winc.htm

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
jags1891
PostPosted: Tue May 16, 2006 7:57 am    Post subject: hi Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

thx man, i just linked it the same way. but there are still link errors
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 16, 2006 9:16 am    Post subject: Re: hi Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

jags1891 wrote:
thx man, i just linked it the same way. but there are still link errors


Then you still didn't link it right. Maybe you should show the link command you used.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jags1891
PostPosted: Tue May 16, 2006 12:51 pm    Post subject: hi Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

I just linked with the GUI that Visual C++ studio provides
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue May 16, 2006 1:02 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You haven't given us enough information to help.

Doesn't the Visual C++ Toolkit show you the commands it runs when it runs a build? It used to, I think.

What exact options on the GUI preferences have you changed? What have you set them to?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mvic
PostPosted: Tue May 16, 2006 1:03 pm    Post subject: Re: hi Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

jags1891 wrote:
I just linked with the GUI that Visual C++ studio provides

Dig around in the output directory (named "Debug" or "Release" usually) and find some files written during the build. It should be possible to unpick the compile and link commands that were used.

We want to help. Please provide the information that we need in order to help you get to the solution.

Did you add mqm.lib to the link libraries in your project build settings?

Kind regards
Back to top
View user's profile Send private message
jags1891
PostPosted: Tue May 16, 2006 1:09 pm    Post subject: Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

yes I did
Back to top
View user's profile Send private message
jags1891
PostPosted: Tue May 16, 2006 1:14 pm    Post subject: Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

jeff, in the properities-> add include directories-> i have given this path
C:\Program Files\IBM\WebSphere MQ\Tools\c\include";"C:\Program Files\IBM\WebSphere MQ\Tools\cplus\include" and in LInker->additional dependencies-> i have given mqm.dll
Back to top
View user's profile Send private message
mvic
PostPosted: Tue May 16, 2006 1:22 pm    Post subject: Re: hi Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

mvic wrote:
Dig around in the output directory (named "Debug" or "Release" usually) and find some files written during the build. It should be possible to unpick the compile and link commands that were used.

What are the contents of your BuildLog.htm file? I have one of these in a Visual Studio .NET 2003 "Debug" output directory.

(Actually the documentation for MQ C++ compile/link at http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amqzan.doc/amqzan09181.htm does not mention mqm.lib, which appears to contradict the suggestion I gave above ).

What happens if you use the details at the URL above?
Back to top
View user's profile Send private message
jags1891
PostPosted: Tue May 16, 2006 1:35 pm    Post subject: hi Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

Creating temporary file "c:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\mqm\mqm\Debug\RSP0000049081364.rsp" with contents
[
/Od /I "C:\Program Files\IBM\WebSphere MQ\Tools\C\Include" /D "WIN32" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /FD /EHa /MDd /Yu"stdafx.h" /Fp"Debug\mqm.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Zi /clr /TP /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll"

".\AssemblyInfo.cpp"

".\mqm.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\mqm\mqm\Debug\RSP0000049081364.rsp" /nologo /errorReport:prompt"
Creating temporary file "c:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\mqm\mqm\Debug\RSP0000059081364.rsp" with contents
[
/Od /I "C:\Program Files\IBM\WebSphere MQ\Tools\C\Include" /D "WIN32" /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /FD /EHa /MDd /Yc"stdafx.h" /Fp"Debug\mqm.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Zi /clr /TP /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll" /FU "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.XML.dll"

".\stdafx.cpp"
]
Creating command line "cl.exe @"c:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\mqm\mqm\Debug\RSP0000059081364.rsp" /nologo /errorReport:prompt"
Creating command line "rc.exe /d "_UNICODE" /d "UNICODE" /fo"Debug/app.res" ".\app.rc""
Creating temporary file "c:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\mqm\mqm\Debug\RSP0000069081364.rsp" with contents
[
/OUT:"C:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\mqm\Debug\mqm.exe" /INCREMENTAL /MANIFEST /MANIFESTFILE:"Debug\mqm.exe.intermediate.manifest" /DEBUG /ASSEMBLYDEBUG /PDB:"c:\documents and settings\jagedesh.bandlamudi\my documents\visual studio 2005\projects\mqm\debug\mqm.pdb" /MACHINE:X86 /FIXED:No MQM.LIB imqb23vn.lib kernel32.lib

".\debug\app.res"

".\debug\mqm.obj"

".\debug\AssemblyInfo.obj"

".\debug\stdafx.obj"
]
Creating command line "link.exe @"c:\Documents and Settings\jagedesh.bandlamudi




this is build log after linking the ones from the link u have given me
Back to top
View user's profile Send private message
mvic
PostPosted: Tue May 16, 2006 1:58 pm    Post subject: Re: hi Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

jags1891 wrote:
MQM.LIB imqb23vn.lib kernel32.lib

What happens if you use imqb23vn.lib imqs23vn.lib as per the URL I posted?
Back to top
View user's profile Send private message
jags1891
PostPosted: Tue May 16, 2006 2:06 pm    Post subject: hi Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

if i use that, its throwing this error

----- Build started: Project: mqm, Configuration: Debug Win32 ------
Linking...
C:\Program Files\IBM\WebSphere MQ\Tools\Lib\MQM.LIB : fatal error LNK1107: invalid or corrupt file: cannot read at 0x9C
Build log was saved at "file://c:\Documents and Settings\jagedesh.bandlamudi\My Documents\Visual Studio 2005\Projects\mqm\mqm\Debug\BuildLog.htm"
mqm - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Back to top
View user's profile Send private message
mvic
PostPosted: Tue May 16, 2006 2:15 pm    Post subject: Re: hi Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

jags1891 wrote:
C:\Program Files\IBM\WebSphere MQ\Tools\Lib\MQM.LIB : fatal error LNK1107: invalid or corrupt file: cannot read at 0x9C

Hmmm, never seen that before. Is MQM.LIB corrupt? If it is, then it may be necessary to re-install to get a non-corrupted version of that file
Back to top
View user's profile Send private message
jags1891
PostPosted: Tue May 16, 2006 2:19 pm    Post subject: hi` Reply with quote

Apprentice

Joined: 15 May 2006
Posts: 32

no I have tried on other computer also
same error.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » General IBM MQ Support » MQ using C
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.