can you create a lib or dll in VS 2005 and link with VS 2008

一个人想着一个人 提交于 2019-12-13 03:47:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!