
Linker cannot open file 'mfc70ud.lib'
Quote:
> I've just upgraded to VS.Net 2003 and - as I'm afraid I could have
> expected - I ran into problems. I've installed 2003 alongside my
> .Net, which I was assured at the lauch event would be just fine, and
> when I try to compile my Managed C++ project, which built just fine
> under the previous version, I get the following error:
> VideoInspector.Engine.Interop2 fatal error LNK1104: cannot open file
> 'mfc70ud.lib'
> The thing is this project uses a C++ library (.lib) which in turn
> uses MFC, and I need to keep it this way. I've looked into this a
> little, and what appears to be the issue here is that the mfc70XX.lib
> files are now named mfc71XX.lib, but for some reason the linker still
> looks for the old files! What's going on? I've checked all possible
> settings on the project and VS itself and nothing indicates that the
> linker should use the old version. Is this just a bug? Has someone
> forgotten to change the default librariy names that link.exe attempts
> to load?
The only reason the linker would look for the old files is if you haven't
re-complied everything. Any MFC file that was compiled with the VC7
compiler will have a hard-wired dependency on the "70" files. Do a full
clean/rebuild and everything should be ok. Note that extends to any/all 3rd
party libraries you're using as well. If there's a dependency on the "70"
MFC from a 3rd party library, you might be able to get away with
/nodefaultlib:mfc70ud.lib on the linker command line to force everything to
use the "71" MFC.
-cd