VC2015提示warning C4996: 'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is dep
当碰到这个警告时,查到原因如下:
1> CollisionModel_contacts.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.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 14.0\VC\atlmfc\include\afx.h(33): note: see declaration of 'MBCS_Support_Deprecated_In_MFC'
1> CollisionModel_contents.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.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 14.0\VC\atlmfc\include\afx.h(33): note: see declaration of 'MBCS_Support_Deprecated_In_MFC'
出现这样的警告,原因是因为:
由于历史原因,MFC同时支持 Unicode 和 MBCS(multi-byte character set),但 Unicode 日渐变得流行,而 MBCS 逐渐用得越来越少,所以,新版本的 MFC 已经把 MBCS 作为过时的方法,所以用新版本的 Visual Studio 编译 MBCS 程序的时候会出现这样的警告信息,建议大家在新的程序中废弃 MBCS 而采用 Unicode。
但是,对于已经采用 MBCS 的旧版的VC++程序,我们不打算将其迁移至 Unicode,又不想见到大量的 C4996 警告,怎么办呢?关闭编译器的 C4996 警告,需要在 preprocessor 定义中增加 NO_WARN_MBCS_MFC_DEPRECATION。
相关文章
- sax错误:org.xml.sax.SAXParseException: Content is not allowed in prolog解决
- Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
- [React Native] Use the SafeAreaView Component in React Native for iPhone X Compatibility
- [AWS Amplify] Store Data in Amazon S3 with React + Amplify
- [Machine Learning] Gradient Descent in Practice I - Feature Scaling
- [Nuxt] Add Arrays of Data to the Vuex Store and Display Them in Vue.js Templates
- [Ramda] Count Words in a String with Ramda's countBy and invert
- [Angular2 Form] Display Validation and Error Messaging in Angular 2
- [React] React components in ES6 classes
- when is this.oModel in sap-ui-core.js initialized for navigation working case
- why in GM0 our extension component this.sPath is not correct
- SAP ABAP关键字在Chrome浏览器里高亮显示的实现原理 - How is ABAP keyword highlight implemented in Chrome
- is transfer = C ( only read dynamically) not supported in one order scenario
- the code place where the binding is converted to final value displayed in u
- when is completed field filled in the backend
- How is html text displayed in Assignment block
- How is account image maintained in CRM rendered in Fiori
- SAP Fiori Elements - How complex binding defined in XML view is parsed
- 成功解决WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python
- 成功解决Value Error: Unable to add relationship because child variable ‘name‘ in ‘cats_df‘ is also its i
- 【异常】MyBatis报错,提示There is no getter for property named ‘数据表中的字段名‘ in ‘实体类‘!
- 已解决SQL_ERROR_INFO: “You have an error in your SQL syntax; check the manual that corresponds to your
- PyCenterNetDetector is not in the models registry
- 【人工智能】所有语言模型都需要位置编码吗? Is Positional Encoding Required In All Language Models?
- kafka.common.KafkaException: Failed to acquire lock on file .lock in /tmp/kafka-logs. A Kafka instance in another process or thread is using this directory.
- Method PUT is not allowed by Access-Control-Allow-Methods in preflight response
- Python使用4个空格替换Tab, TabError: inconsistent use of tabs and spaces in indentation。
- atitit.解决net.sf.json.JSONException There is a cycle in the hierarchy
- Aggregates in Pandas
- uni-app的Vue项目中Echarts的报错提示:[Vue warn]: Error in data(): “ReferenceError: echarts is not defined“