【问题标题】:Is there an #ifdef in Qt to determine if we're building for AndroidQt 中是否有 #ifdef 来确定我们是否正在为 Android 构建
【发布时间】:2014-05-26 10:51:51
【问题描述】:

我的 Qt 应用程序中有一个特定于 Android 的修复程序,我希望仅在为 Android 构建时编译该代码。

有没有#if#ifdef 可以做到这一点?

【问题讨论】:

    标签: android c++ qt conditional-compilation


    【解决方案1】:

    是的,你可以找到它in the documentation,所以只需使用:

    #ifdef Q_OS_ANDROID
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-11-01
      • 2016-02-23
      • 1970-01-01
      • 2016-06-13
      • 2011-07-06
      • 2011-11-02
      • 1970-01-01
      相关资源
      最近更新 更多