How do I turn off Unicode in a VC++ project?

2019-01-05 01:01发布

I have a VC++ project in Visual Studio 2008.

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.

alt text http://i26.tinypic.com/14nz693.jpg

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

Where is the unicode being turned on in the VC++ project, how can I turn it off?

7条回答
狗以群分
2楼-- · 2019-01-05 02:07

Burgos has the right answer. Just to clarify, the Character Set should be changed to "Not Set".

查看更多
登录 后发表回答