VS2008升级到VS2010“无法打开文件‘mfc90d.lib’”
我正在尝试将 Visual C++ 2008 项目升级到 Visual C++ 2010 项目。当升级完成并且我强制升级时,我收到此错误: 致命错误 LNK1104:无法打开文件“mfc90d.lib”
我认为它应该引用“mfc100d.lib”,我尝试了很多方法来修复它但失败了。
有人遇到同样的问题吗?
I am trying to upgrade a Visual C++ 2008 project to a Visual C++ 2010 project. when the upgrade is finished and I compelled it, I got this error:
fatal error LNK1104: cannot open file 'mfc90d.lib'
I think it should reference to "mfc100d.lib", I tried many ways to fix it but failed.
does anyone meet the same problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能的原因包括
a) 您没有重建所有源文件 - 尝试删除所有输出 obj 和 lib 以确保
b) 您正在链接使用 VC9 构建的第 3 方静态库 - 您将需要 VC10 版本
c) 您的标头路径指向 VC9 标头(检查解决方案的路径选项)
d) 由于某些其他原因,您的项目包含对 mfc90d 的明确引用。
下一步诊断步骤:在链接器上设置 /verbose 选项,并准确计算出 mfc90d.lib 中正在拖动哪个 obj。
马丁
Possible causes include
a) You are not rebuilding all source files - try deleting all output obj and lib to be sure
b) You are linking a 3rd party static lib that was built with VC9 - you will need the VC10 version
c) Your header paths are pointing at VC9 headers (check your solution's path options)
d) Your project includes an explicit reference to mfc90d for some other reason.
Next diagnosis step: set the /verbose option on the linker and work out exactly which obj is dragging in mfc90d.lib.
Martyn
我通过对所有源文件中的定义“_MFC_FILENAME_VER”进行全局搜索,发现了丢失的 MFC100.dll 的问题。我在我的一个头文件中找到了以下定义:
在此块中使用了以下定义:
我将其更改为:
因此它将使用 VS 2012 版本的 MFC (mfc110d.lib) 进行编译。
I found the problem to my missing MFC100.dll by doing a global search of all my source files for the definition "_MFC_FILENAME_VER". I found following definition in one of my header files:
which was used in this block:
I changed it to:
so it would compile with VS 2012's version of MFC (mfc110d.lib).