The MBCS libraries were deprecated in Visual Studio 2013 and Visual Studio 2015
hint info:
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h(38): error C2220: warning treated as error - no 'object' file generated
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h(38): warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC.
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h(33) : see declaration of 'MBCS_Support_Deprecated_In_MFC'
Why is MBCS needed?
Some languages, for example, Japanese and Chinese, have large character sets.
To support programming for these markets,
the MFC enables two different approaches to handling large character sets:
- Unicode, wchar_t based wide-characters, and strings encoded as UTF-16.
- Multibyte Character Sets (MBCS), char based single or double-byte characters and strings encoded in a locale-specific character set.
Triggering reason
Project Properties -> General
Character Set: Use Multi-Byte Character Set
Referenced from "Error preprocessor directives when building".
Solution
Project Properties -> C\C++ > Preprocessor -> Preprocessor Definition
add:
NO_WARN_MBCS_MFC_DEPRECATION
浙公网安备 33010602011771号