Discussion:
fatal error LNK1104: cannot open file 'mfc71.lib'
(too old to reply)
TahoeKid
2006-08-01 19:53:02 UTC
Permalink
I have a project that was built with VS 2003. After doing the auto
conversion with VS 2005, I now get this error message when linking:

fatal error LNK1104: cannot open file 'mfc71.lib'

There is only one .cpp file in this project. There is no reference to
MFC71.lib in the project. Any ideas?
Ajay Kalra
2006-08-01 20:00:17 UTC
Permalink
Post by TahoeKid
I have a project that was built with VS 2003. After doing the auto
fatal error LNK1104: cannot open file 'mfc71.lib'
There is only one .cpp file in this project. There is no reference to
MFC71.lib in the project. Any ideas?
This doesnt make sense. Make sure you do a rebuild all so that previous
build is cleaned up.

---
Ajay
Joseph M. Newcomer
2006-08-01 21:16:51 UTC
Permalink
You are trying to link in a .lib file that was compiled under VS.NET 2003. It doesn't
matter how many files are in the project, it matters what libraries you are trying to link
in. You might also have an explicit path to a library file somewhere.
joe
Post by TahoeKid
I have a project that was built with VS 2003. After doing the auto
fatal error LNK1104: cannot open file 'mfc71.lib'
There is only one .cpp file in this project. There is no reference to
MFC71.lib in the project. Any ideas?
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer
2006-08-01 21:21:07 UTC
Permalink
Additional thought: go into the linker settings and turn on the verbose mode. In VS.NET
2003 this is in the project properties, linker, general, "Show progress". This will show
what libraries are being loaded, and may help you find the bad library. I can't tell you
where it is in 2005 because my MSDN subscription hasn't arrived yet, and I've been out of
town so much in the last four months that I haven't had time to worry about it, but Eric
told me last week he's working on finding out what happened.
joe
Post by TahoeKid
I have a project that was built with VS 2003. After doing the auto
fatal error LNK1104: cannot open file 'mfc71.lib'
There is only one .cpp file in this project. There is no reference to
MFC71.lib in the project. Any ideas?
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
TahoeKid
2006-08-02 20:23:13 UTC
Permalink
It was an old vendor supplied DLL / .lib which was linked in that
caused the problem. It would be useful if when the linker says it
cannot find a certain library, that it also lists the dependent file(s)
causing the linker error. The error message should be like,

fatal error LNK1104: cannot open file 'mfc71.lib' referenced from:
..\..\libs\oldcode.lib

Loading...