Error preprocessor directives when building
c++, mfc, visual-studio-2013
Solution
The `_MBCS` symbol will be defined as a result of the settings in your project properties. Look at `General->Character Set` - this is what adds the required entries to the command line.
To continue using MBCS, you need to install the optional support from Microsoft here
As it notes in MSDN:
The code in your question actually gives a link to this blog post, which discusses the changes and includes a link to the download:
// Warn about MBCS support being deprecated: see http://go.microsoft.com/fwlink/p/?LinkId=279048 for more information.
So, you can either download the patch from the link above or migrate your application to UNICODE.
Problem
When building a VS2013 solution (migrated from VS8) I get the following error : Error 1 error C2220: warning treated as error - no 'object' file generated C:\Program Files\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h 38 Warning 2 warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be removed in a future version of MFC. C:\Program Files\Microsoft Visual Studio 12.0\VC\atlmfc\include\afx.h 38 This is caused bij the following code : ``` #ifdef _MBCS // Warn about MBCS support being deprecated: see http://go.microsoft.com/fwlink/p/?LinkId=279048 for more information. #pragma warning(push) #pragma warning(1 : 4996) inline __declspec(deprecated("MBCS support in MFC is deprecated and may be removed in a future version of MFC.")) void MBCS_Support_Deprecated_In_MFC() { } class MBCS_Deprecated_MFC { public: MBCS_Deprecated_MFC() { MBCS_Support_Deprecated_In_MFC(); } }; #pragma warning(pop) #endif ``` How can I find where _MBCS is defined in the solution. Find doesn't has any results.