Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I am using IBM Websphere MQ libraries imqb23vn.Lib and imqs23vn.Lib to build a 64-bit C++ application in Visual Studio 2010. I downloaded 64-bit versions of the libraries from IBM and put them into the lib directory. I referenced the directory in the Linker properties under Additional Library Directories. Under Linker->Input I included the two libraries under Additional Dependencies.

When I compile the application, I get a bunch of linking errors "LNK2001: unresolved external symbol "public: static inc __cdecl ImqMgr::behavior(void)".

I am setting this up on a new Windows 2008 64-bit server. The application compiled and worked fine for 9 years in current 32-bit Windows 2003 server environment. Any help would be appreciated. Thanks.
Posted
Comments
Richard MacCutchan 16-Jul-14 9:27am    
Have you run a complete rebuild of the project? Have you checked the documentation that comes with the libraries?
Nick R 336 16-Jul-14 9:30am    
Yes, I have been running a complete rebuild of the project. I haven't checked the documentation. I will review it now.
Richard MacCutchan 17-Jul-14 5:24am    
Are you sure you changed your project settings to x64?
Nick R 336 17-Jul-14 9:57am    
Yes, the project is compiled in 64 bit. I am also using 64-bit LDAPSDK dll

1 solution

that is the truth - trust your linker: it doesnt find the libs.

With one time googling If found a similar discussion. Which has some tips to resolve this issue.
 
Share this answer
 
v2
Comments
Nick R 336 16-Jul-14 11:20am    
I double-checked the version of the files and the path in the project.
KarstenK 16-Jul-14 14:29pm    
rename the path of the 32-bit versions.

Can it be some version mismatch or that the libs were build with dynamic linking and your build uses static libs?

You wrote about "a bunch". Update your question with the first ten (guess) errors. The FIRST error leeds to the solution ;-)
Nick R 336 16-Jul-14 15:05pm    
error LNK2001: unresolved external symbol "public: static int __cdecl ImqMgr::behavior(void)" (?behavior@ImqMgr@@SAHXZ)
Error 415 error LNK2001: unresolved external symbol "public: static void __cdecl ImqMgr::setBehavior(int)" (?setBehavior@ImqMgr@@SAXH@Z)
Error 430 error LNK2001: unresolved external symbol "public: unsigned char __cdecl ImqObj::setOpenOptions(int)" (?setOpenOptions@ImqObj@@QEAAEH@Z)
Nick R 336 16-Jul-14 15:06pm    
There is no 32-bit versions of the libraries. How do I switch between dynamic and static linking for the libraries?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900