得到错误:“无法打开文件mfc120d.lib”在VS2017中构建项目。最近从VS2013升级到VS2017。 [英] getting error : "cannot open file mfc120d.lib" while building the project in VS2017. upgraded from VS2013 to VS2017 recently.

查看:500
本文介绍了得到错误:“无法打开文件mfc120d.lib”在VS2017中构建项目。最近从VS2013升级到VS2017。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近从VS2013升级到VS2017。当试图在VS2017中构建项目时出现错误,因为"无法打开文件mfc120d.lib " project的字符集是多字节字符集。当平台工具集设置为"v120"时,我们能够成功构建项目
 但不是在设置为"v141"时。我们不能将字符集更改为Unicode,因为它对我们来说是一个昂贵的过程,需要解决这个问题只有字符集多字节字符。 

解决方案

您好


希望这对您有所帮助


最诚挚的问候,


Sera Yu


we have recently upgraded from VS2013 to VS2017. when tried to building projects in VS2017 getting error as "cannot open file mfc120d.lib" project's character set is Multi-byte character set. we are able to build projects successfully when platform toolset is set to "v120"  but not when set to "v141". we cant change the character set to Unicode as it is an expensive process for us currently, need solution to this problem with character set Multi-Byte character only. 

解决方案

Hi rajesh.peddalachugari,

thanks for posting her.

>>when tried to building projects in VS2017 getting error as "cannot open file mfc120d.lib" project's character set is Multi-byte character set. we are able to build projects successfully when platform toolset is set to "v120"  but not when set to "v141".

Have you tried to upgrade your project when you first open it in vs2017?

You got the error because when you dynamically link your application to the MFC library, you have to redistribute the matching MFC DLL. For example, if your MFC app is built by using the version of MFC that ships with Visual Studio 2013, you must redistribute mfc120.dll.

Here is a document about Redistributing the MFC Library.

https://msdn.microsoft.com/en-us/library/ms235264.aspx

Hope this could be help of you

Best Regards,

Sera Yu


这篇关于得到错误:“无法打开文件mfc120d.lib”在VS2017中构建项目。最近从VS2013升级到VS2017。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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