Visual Studio属性表:为什么缺少字符集? [英] Visual Studio property sheets: Why is Character Set missing?

查看:256
本文介绍了Visual Studio属性表:为什么缺少字符集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2010 SP1.我注意到可以将属性表添加到项目中,但是不能更改那些属性表中的字符集.我创建的所有属性表都缺少字符集"选项.

I'm using Visual Studio 2010 SP1. I notice that I can add property sheets to a project but I cannot change the character set in those property sheets. Any property sheet I create is missing the 'Character Set' option.

谁能解释为什么我不能使用属性表来设置字符集?是否有一些无法使用属性表设置的禁止属性列表?

Can anyone explain why I can't set the character set using a property sheet? Is there some list of forbidden properties that can't be set using a property sheet?

谢谢

推荐答案

好吧,我在硬盘上进行了一些搜索,找到了答案.

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

项目默认值(字符集的一部分)定义了要继承的默认MSBuild属性表.因此,当您在项目中选择字符集"时,您不会更改项目文件中的预处理程序定义,而是您的项目文件将继承一个字符集属性表,该属性表会更改这些定义.如果不选择字符集,则不会继承任何属性表.

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.

Unicode和MBCS属性表位于此处:

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

MBCS属性表仅将_MBCS添加到编译器的预处理程序定义(C/C ++预处理程序定义)中. Unicode属性表仅将UNICODE和_UNICODE添加到编译器的预处理器定义(C/C ++预处理器定义)和资源编译器的定义(资源预处理器定义)中.就是这样.

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.

这篇关于Visual Studio属性表:为什么缺少字符集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆