0

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,

Jacob
  • 34,255
  • 14
  • 110
  • 165
ant2009
  • 27,094
  • 154
  • 411
  • 609

3 Answers3

1

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
  • 16,798
  • 8
  • 46
  • 66
1

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

John Dibling
  • 99,718
  • 31
  • 186
  • 324
0

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
  • 22,920
  • 8
  • 63
  • 107