如何在VC ++项目中关闭Unicode? [英] How do I turn off Unicode in a VC++ project?
问题描述
我在Visual Studio 2008中有一个VC ++项目.
I have a VC++ project in Visual Studio 2008.
它正在编译器命令行(/D "_UNICODE" /D "UNICODE"
)上定义unicode的符号,即使我在项目的预处理器部分中未打开此符号.
It is defining the symbols for unicode on the compiler command line (/D "_UNICODE" /D "UNICODE"
), even though I do not have this symbol turned on in the preprocessor section for the project.
结果是,我针对所有Win32库函数的Unicode版本(而不是ANSI版本)进行编译.例如在WinBase.h中,有:
As a result I am compiling against the Unicode versions of all the Win32 library functions, as opposed to the ANSI ones. For example in WinBase.h, there is:
#ifdef UNICODE
#define CreateFile CreateFileW
#else
#define CreateFile CreateFileA
#endif // !UNICODE
在VC ++项目中打开Unicode的位置在哪里,如何关闭它?
Where is the unicode being turned on in the VC++ project, how can I turn it off?
推荐答案
您是否尝试过:项目属性-常规-项目默认值-字符集?
Have you tried: Project Properties - General - Project Defaults - Character Set?
有关使用多字节字符集"和未设置"选项之间的区别,请参见此问题的答案:
See answers in this question for the differences between "Use Multi-Byte Character Set" and "Not Set" options: About the "Character set" option in visual studio 2010
这篇关于如何在VC ++项目中关闭Unicode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!