views:

275

answers:

3

Hello,

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  A: 

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)
Benoît
A: 

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.

Shoban
+1  A: 

Make sure you have added the path where your lib files are under project settings in Linker>General>Additional Library Directories

John Dibling