Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can pro file use #if defined(Q_OS_ANDROID)?

Can pro file use #if defined(Q_OS_ANDROID)?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr Pang
    wrote on last edited by
    #1

    Hi,
    I want to add such code to project.pro :

    #if defined(Q_OS_ANDROID)
    QT += androidextras
    #endif
    

    How?

    raven-worxR 1 Reply Last reply
    0
    • M Mr Pang

      Hi,
      I want to add such code to project.pro :

      #if defined(Q_OS_ANDROID)
      QT += androidextras
      #endif
      

      How?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @Mr-Pang
      no this is C/C++ macro syntax.
      qmake has it's own mechanism:

      android-g++ {
      QT += androidextras
      }
      

      or this should also be supported:

      android {
      QT += androidextras
      }
      

      or alternatively a one-liner:

      android-g++:QT += androidextras
      

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      M 1 Reply Last reply
      1
      • raven-worxR raven-worx

        @Mr-Pang
        no this is C/C++ macro syntax.
        qmake has it's own mechanism:

        android-g++ {
        QT += androidextras
        }
        

        or this should also be supported:

        android {
        QT += androidextras
        }
        

        or alternatively a one-liner:

        android-g++:QT += androidextras
        
        M Offline
        M Offline
        Mr Pang
        wrote on last edited by
        #3

        @raven-worx
        Yes, this is what I need. Thanks!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved