如何解决从VS2010升级到VS2013的项目中的链接器错误,在该项目中,链接器正在寻找不存在的MFC库文件? [英] How do I fix the linker error in project upgraded from VS2010 to VS2013 where the linker is looking for an MFC library file that is not present?

查看:221
本文介绍了如何解决从VS2010升级到VS2013的项目中的链接器错误,在该项目中,链接器正在寻找不存在的MFC库文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将VS2010项目升级到VS2013.我的一个应用程序正在寻找mfc120.lib(或用于调试版本的mfc120d.lib).但是,似乎VS2013附带了mfc120 * u *.lib和mfc120 * u * d.lib(大概是unicode版本,这是VS2013支持的唯一MFC版本) ).

I am upgrading a VS2010 project to VS2013. One of my applications is looking for mfc120.lib (or mfc120d.lib for debug builds). However, it appears that VS2013 ships with mfc120*u*.lib and mfc120*u*d.lib (presumably unicode versions which is the only version of MFC supported by VS2013).

这是我遇到的链接器错误:

Here are the linker errors I'm getting:

LINK : fatal error LNK1104: cannot open file 'mfc120.lib'
LINK : fatal error LNK1104: cannot open file 'mfc120d.lib'

我正在浏览项目属性表,但没有看到用于指定要链接到哪个MFC库文件的任何设置.甚至没有显示在属性表的链接器->命令行"页面中.

I'm looking through the project property sheets and don't see any setting for specifying which MFC library file to link against. It's not even showing up in the "Linker-->Command Line" page of the property sheets.

有人可以帮我弄清楚如何使项目链接到正确的库文件吗?

Can someone help me figure out how to get the project to link to the correct library files?

非常非常感谢您!

推荐答案

在您的编译命令行中,可能有一个

In your compile commandline, there is probably a

/D "_MBCS"

应该是

/D "_UNICODE"

实际上就像放一个

#define _UNICODE

位于源文件的顶部,但我认为它会影响将哪些库正确导入.

at the top of your source files, but I think it affects what libraries are pulled in well.

有关详细信息,请参见 MSDN文档.

See the MSDN docs for more info.

这篇关于如何解决从VS2010升级到VS2013的项目中的链接器错误,在该项目中,链接器正在寻找不存在的MFC库文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆