问题
I am using visual studio 2008 SP1.
And I am creating a desktop application using MFC.
I have a library I want to link with my application. However, the library was written in WIN32 visual studio 2005.
I am been having a trouble linking:
fatal error LNK1104: cannot open file 'AgentLib.lib'
I am wondering if it is because I am using MFC 2008 and the library was written and compiled with 2005?
Many thanks for any advice,
回答1:
Make sure you have added the path where your lib files are under project settings in Linker>General>Additional Library Directories
回答2:
There should be no problem to do that.
You can either
- Add the directory where AgentLib.lib is to the library directories of your project.
- Add AgentLib.lib to your project (you may get a message box from Visual Studio asking for a rule, but there is no need for one, and it works)
回答3:
Yes it is possible. f you have issues please Check this links for some help. Also check for any dependent file which is being used by the lib created using VS 2005.
来源:https://stackoverflow.com/questions/651198/can-you-create-a-lib-or-dll-in-vs-2005-and-link-with-vs-2008