如何在 VC++ 项目中关闭 Unicode? [英] How do I turn off Unicode in a VC++ project?

查看:34
本文介绍了如何在 VC++ 项目中关闭 Unicode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 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?

有关使用多​​字节字符集"和未设置"选项之间的区别,请参阅此问题中的答案:关于字符集"Visual Studio 2010 中的选项

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屋!

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