Visual Studio property sheets: Why is Character Set missing?

萝らか妹 提交于 2019-12-03 17:19:28

Ok I did some searching on my hard drive and found the answer.

Project Defaults, which Character Set is a part of, define which default MSBuild property sheets to inherit. Therefore when you choose Character Set in your project you are not changing preprocessor defines in your project file, and instead your project file will inherit a character set property sheet which changes those defines. If you do not choose a character set then no property sheet is inherited.

The Unicode and MBCS property sheets are located here:

C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.MultiByteCharSupport.props
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.unicodesupport.props

The MBCS property sheet only adds _MBCS to the compiler's preprocessor defines (C/C++ Preprocessor Definitions). The Unicode property sheet only adds UNICODE and _UNICODE to both the compiler's preprocessor defines (C/C++ Preprocessor Definitions) and the resource compiler's defines (Resources Preprocessor Definitions). And that's it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!