检查 Visual C++ 6.0 项目是否支持 unicode? [英] Check whether a Visual C++ 6.0 project did support unicode or not?

查看:37
本文介绍了检查 Visual C++ 6.0 项目是否支持 unicode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道 Visual C++ 6.0 项目是否支持 Unicode.我该如何检查?

I need to know if a Visual C++ 6.0 project supports Unicode or not. How can I check that?

推荐答案

如果项目编译时支持 Unicode,则预处理指令 UNICODE(或 _UNICODE)将被定义.测试以查看是否已定义将为您提供答案:

If the project is compiled with Unicode support, then the preprocessor directive UNICODE (or _UNICODE) will be defined. Testing to see if this is defined will give you your answer:

#if defined(UNICODE) || defined(_UNICODE)
    // The project is compiled for Unicode
#else
    // The project is NOT compiled for Unicode
#endif

您也可以在项目设置中进行检查.

You can also check this from within your project's settings.

  1. 从项目"菜单中,点击设置".
  2. 选择C/C++"选项卡.
  3. 在预处理器定义"部分,检查是否存在 UNICODE_UNICODE.

如果您有一个当前面向 Unicode 的项目,但您想看看它是否可以,那么最好的做法是定义这些预处理器指令,然后尝试编译您的项目.如果成功,那么你就准备好了.如果失败,请检查并纠正编译器发出的错误.

If you have a project that is not currently targeting Unicode, but you want to see if it can, then the best thing to do would be to define these preprocessor directives, and then try compiling your project. If it succeeds, then you're set. If it fails, go through and correct the errors emitted by the compiler.

这篇关于检查 Visual C++ 6.0 项目是否支持 unicode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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