The MBCS libraries were deprecated in Visual Studio 2013 and Visual Studio 2015

Removing MBCS deprecated warning in VS2013/VS2015

2025-11-27

Written by: xiaobin

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:

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

Ref