Author |
Message
|
pvemuri |
Posted: Mon Dec 06, 2004 11:54 am Post subject: Error while deploying MQGET |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Hello all,
I have implemented C custom node in MB5.0 and while compiling it i am getting error.I have installed the softwares for C++ compiler, VC++ with servicepack 5 on windows 2000,
The error is:-
LINK : fatal error LNK1181: cannot open input file "C:\IBM\WebSphere.obj"
Any idea ?
Thanks,
pvemuri. |
|
Back to top |
|
 |
kirani |
Posted: Mon Dec 06, 2004 1:52 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
What version of visual c++ compiler are you using? Supported versions are documented in programming manuals. Also, please make sure you link it with mqm.lib file. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
chenulu |
Posted: Mon Dec 06, 2004 2:14 pm Post subject: |
|
|
Voyager
Joined: 27 Mar 2002 Posts: 87 Location: Research Triangle Park, NC
|
Hi,
Please post your makefile. Plugin nodes do not require WebSphere.obj. Please refer to the online help topic "as10000_" (search with the double quotes) where it is mentioned what the compile command is for Windows.
-- Chenulu |
|
Back to top |
|
 |
pvemuri |
Posted: Tue Dec 07, 2004 7:24 am Post subject: |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Kiran / Chenulu,
I am using Visual C++ version 6.0.
I did not find any make file for WinNT. The help has a make file for Solaris and AIX but not for NT. As given in the help for WinNT I am trying to use the following command. The command and its result is in the follwoing screen shot.
Code: |
C:\IBM>cl /VERBOSE /LD /MD /Zi /I "C:\IBM\WebSphere MQ\Tools\c\include" /I "C:\I BM\WebSphere Business Integration Message Brokers\include\plugin" MQGet.c NodeUt ils.c -link /DLL "C:\IBM\WebSphere Business Integration Message Brokers\lib\imb dfplg.lib" /OUT:Switch45.lil Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
MQGet.c
NodeUtils.c
Generating Code...
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:MQGet.dll
/dll
/implib:MQGet.lib
/debug
/DLL
C:\IBM\WebSphere Business Integration Message Brokers\lib\imbdfplg.lib /OUT:Switch45.lil MQGet.obj NodeUtils.obj LINK : fatal error LNK1181: cannot open input file "C:\IBM\WebSphere.obj" |
|
|
Back to top |
|
 |
chenulu |
Posted: Tue Dec 07, 2004 7:37 am Post subject: |
|
|
Voyager
Joined: 27 Mar 2002 Posts: 87 Location: Research Triangle Park, NC
|
Hi Phani,
Copy the contents here into a batch file and exectute it. Make sure you run the vcvars32.bat (will be in the VC++\bin directory to setup the environment) Also make sure that <WBI-MB>\include is set in your INCLUDE environment variable
@echo off
rem --- You need to run the vcvars32
cl /VERBOSE /LD /MD /Zi /D_WIN32 /I<WBI-MB>\include\plugin /I<MQ>\Tools\c\include stdafx.cpp NodeUtils.c MQGet.c -link /NODEFAULTLIB:library /NOD:libc.lib stdafx.obj NodeUtils.obj mqget.obj /DLL <WBI-MB>\lib\imbdfplg.lib c:\var\vc98\lib\advapi32.lib <MQ>\tools\lib\mqm.lib /OUT:MQGet.lil
Change the WBI-MB and MQ to the respective installation directories and post the results.
-- Chenulu |
|
Back to top |
|
 |
pvemuri |
Posted: Tue Dec 07, 2004 8:03 am Post subject: |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Chenulu,
we are getting the same error ( the one I posted previously), even after compiling the same way you asked us to do. Any idea why ?
Kiran,
when we tried to link it with mqm.lib we are getting the following error.
Code: |
C:\IBM>cl /VERBOSE /LD /MD /Zi /D_WIN32 /I "c:\IBM\WebSphere Business Integratio n Message Brokers\include\plugin" /I"C:\IBM\WebSphere MQ\Tools\c\include" stdafx .cpp NodeUtils.c MQGet.c -link /NODEFAULTLIB:library C:\IBM\Microsoft Visual Stu dio\VC98\Lib:LIBC.lib stdafx.obj NodeUtils.obj mqget.obj /DLL C:\IBM\WebSphere B usiness Integration MessageBrokers\lib\imbdfplg.lib C:\IBM\Microsoft Visual Stud io\VC98\Lib\advapi32.lib C:\IBM\WebSphere MQ\Tools\Lib\mqm.lib/OUT:MQGet.lil
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
stdafx.cpp
Generating Code...
Compiling...
NodeUtils.c
MQGet.c
Generating Code...
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:stdafx.dll
/dll
/implib:stdafx.lib
/debug
/NODEFAULTLIB:library
C:\IBM\Microsoft
Visual
Studio\VC98\Lib:LIBC.lib
stdafx.obj
NodeUtils.obj
mqget.obj
/DLL
C:\IBM\WebSphere
Business
Integration
MessageBrokers\lib\imbdfplg.lib
C:\IBM\Microsoft
Visual
Studio\VC98\Lib\advapi32.lib
C:\IBM\WebSphere
MQ\Tools\Lib\mqm.lib/OUT:MQGet.lil
stdafx.obj
NodeUtils.obj
MQGet.obj
LINK : fatal error LNK1181: cannot open input file "C:\IBM\Microsoft.obj" |
Thanks,
Phani. |
|
Back to top |
|
 |
mgk |
Posted: Tue Dec 07, 2004 8:29 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Hi,
I believe that the linker is getting confused by the long path names you are using for the libs you are explicitly referencing on the command line.
You should either surround them in quotes, or use the shortname of the folder.
e.g. :
C:\IBM\Microsoft Visual Studio\VC98\Lib\advapi32.lib
should be:
"C:\IBM\Microsoft Visual Studio\VC98\Lib\advapi32.lib"
or it should be something like:
c:\IBM\Micros~1\VC98\Lib\advapi32.lib
note that in this case your shortname could vary depending on your seutp. Use dir /X to find out the shortname of a folder.
You will need to do this for ALL libs you are referencing explicitly
Regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
pvemuri |
Posted: Tue Dec 07, 2004 8:56 am Post subject: |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
We tried every thing suggested by you all, but with out any luck. we will post out once we find a success.
Thanks,
phani. |
|
Back to top |
|
 |
chenulu |
Posted: Tue Dec 07, 2004 5:07 pm Post subject: |
|
|
Voyager
Joined: 27 Mar 2002 Posts: 87 Location: Research Triangle Park, NC
|
Hi Phani,
Why are there spaces in the long path names? Also, to reduce the size of the command, set the LIB and INCLUDE environment variables to have the MS and WBI-MB libraries and include files respectivelu so that you need not have the long compile command. Also, use the short path name convention. you can get the short path names of the directoies by issuing a dir /x from the command prompt.
Let me know if you can't get it to compile so that I will send you the lil file for Windows.
-- Chenulu |
|
Back to top |
|
 |
pvemuri |
Posted: Wed Dec 08, 2004 7:17 am Post subject: |
|
|
 Voyager
Joined: 05 Jan 2004 Posts: 83 Location: CA, USA
|
Chenulu,
We were actually trying to modify the functionality provoded by MQGET and then re-compile. We ar able to compile it successfully now.
For the compilation process we have set the "C:\IBM\WEBSPH~2\include\plugin" for compiling the C files(including header files). We added imbdfplg.lib,advapi32.lib,and mqm.lib in the link DLL. Here we copied advapi32.lib file form "microsoft visul studio\VC98\Bin" directory.we copied mqm.lib file form "C:\IBM\WEBSPH~1\Tools\Lib" to "C:\IBM\WebSphere Business Integration Message Brokers\lib" but we got some error,that's why we set direct path for mqm.lib.
The following command is sucessfully working.
cl /VERBOSE /LD /MD /Zi /I "C:\IBM\WEBSPH~2\include\plugin" MQGet.c NodeUtils.c StdAfx.cpp -link /DLL C:\IBM\WEBSPH~2\lib\imbdfplg.lib advapi32.lib C:\IBM\WEBSPH~1\Tools\Lib\mqm.lib /OUT:MQGet.lil.
I really thank you for your effort in helping us out.
regards,
Phani. |
|
Back to top |
|
 |
|