VC2015 hint warning C4996: ' MBCS_SUPPORT_DEPRECATED_IN_MFC ': MBCS support in MFC is DEP

Source: Internet
Author: User
Tags deprecated

When this warning is encountered, the following reasons are found:

1> Collisionmodel_contacts.cpp
1>c:\program Files (x86) \microsoft Visual Studio 14.0\vc\atlmfc\include\afx.h: Warning C4996: ' Mbcs_support_ Deprecated_in_mfc ': MBCS support in MFC was Deprecated and may be removed in a future version of MFC.
1> C:\Program Files (x86) \microsoft Visual Studio 14.0\vc\atlmfc\include\afx.h (): Note:see declaration of ' Mbcs_sup Port_deprecated_in_mfc '
1> Collisionmodel_contents.cpp
1>c:\program Files (x86) \microsoft Visual Studio 14.0\vc\atlmfc\include\afx.h: Warning C4996: ' Mbcs_support_ Deprecated_in_mfc ': MBCS support in MFC was Deprecated and may be removed in a future version of MFC.
1> C:\Program Files (x86) \microsoft Visual Studio 14.0\vc\atlmfc\include\afx.h (): Note:see declaration of ' Mbcs_sup Port_deprecated_in_mfc '


The reason for this warning is because:

For historical reasons, MFC supports both Unicode and MBCS (Multi-Byte character set), but Unicode is becoming more popular, and MBCS is increasingly being used, so the new version of MFC has used MBCS as an obsolete method, so with the new When the version of Visual Studio compiles the MBCS program, this warning message appears, suggesting that you discard MBCS in the new program and use Unicode.



However, for the old version of the use of MBCS VC + + program, we do not intend to migrate it to Unicode, and do not want to see a lot of C4996 warning, how to do? Turn off the compiler's C4996 warning and need to add no_warn_mbcs_mfc_deprecation to the preprocessor definition .



http://blog.csdn.net/caimouse/article/details/51749579

VC2015 hint warning C4996: ' MBCS_SUPPORT_DEPRECATED_IN_MFC ': MBCS support in MFC is DEP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.