MBCS Error building MFC C++ project with Visual Studio(使用 Visual Studio 构建 MFC C++ 项目时出现 MBCS 错误)
问题描述
我使用 Visual Studio 打开了现有的 MFC 项目,并且在构建时收到以下错误消息:
I opened my existing MFC project using Visual Studio and when I build I get the following error message:
Error 1 error MSB8031: Use of MBCS encoding in MFC projects require an additional library to be downloaded and installed. Please see http://go.microsoft.com/fwlink/?LinkId=286820 for more information. C:Program FilesMSBuildMicrosoft.Cppv4.0v120Microsoft.CppBuild.targets
这是怎么回事?
推荐答案
此错误消息是由于缺少 MBCS MFC 包.从 Visual Studio 2013 开始,MFC 库的 MBCS 部分已从 Visual Studio 产品中分离出来,单独下载.安装这个包并重建应该可以解决问题.
This error message is due to the missing MBCS MFC package. Starting with Visual Studio 2013, MBCS portion of the MFC library has been broken out of the Visual Studio product into its own separate download. Installing this package and rebuilding should fix the problem.
- 可在此处 下载
- 提供有关此更改的更多信息 这里
Visual Studio 2015 更新
从 Visual Studio 2015 开始,整个 MFC C++ 库(包括 MBCS 部分)都是可选的安装组件.安装VS2015时,如果选择C++和MFC,也会得到MBCS库.
Starting with Visual Studio 2015, the entire MFC C++ library (including the MBCS pieces) is an optional install component. While installing VS2015, if you select C++ and MFC, you will also get the MBCS library.
这篇关于使用 Visual Studio 构建 MFC C++ 项目时出现 MBCS 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 Visual Studio 构建 MFC C++ 项目时出现 MBCS 错误


基础教程推荐
- 管理共享内存应该分配多少内存?(助推) 2022-12-07
- 从 std::cin 读取密码 2021-01-01
- 如何使图像调整大小以在 Qt 中缩放? 2021-01-01
- 使用从字符串中提取的参数调用函数 2022-01-01
- 为什么语句不能出现在命名空间范围内? 2021-01-01
- Windows Media Foundation 录制音频 2021-01-01
- 为 C/C++ 中的项目的 makefile 生成依赖项 2022-01-01
- 如何在不破坏 vtbl 的情况下做相当于 memset(this, ...) 的操作? 2022-01-01
- 如何“在 Finder 中显示"或“在资源管理器中显 2021-01-01
- 在 C++ 中循环遍历所有 Lua 全局变量 2021-01-01