Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Detecting the target architecture in .pro file
Forum Updated to NodeBB v4.3 + New Features

Detecting the target architecture in .pro file

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 1 Posters 6.1k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #1

    I am looking for a way to distinguish between different target platforms (32 and 64 bit) respectively between the different tools chains used.
    I have found "this":http://qt-project.org/faq/answer/how_can_i_detect_in_the_.pro_file_if_i_am_compiling_on_a_32_bit_or_a_64_bi
    but it does not really help or the discussion is wrong. Using in the .pro file:
    @
    message (HOST:$$QMAKE_HOST)
    message (HOST:$$QMAKE_HOST.arch)
    message (TARGET:$$QMAKE_TARGET)
    message (TARGET:$$QMAKE_TARGET.arch)
    @
    Following output is generated:
    @
    Project MESSAGE: HOST:
    Project MESSAGE: HOST:x86
    Project MESSAGE: TARGET:
    Project MESSAGE: TARGET:
    @
    This is on win7 64 bit with a MinGW 32 bit tool chain.
    On another installation it shows:
    @
    Project MESSAGE: HOST:
    Project MESSAGE: HOST:x86_64
    Project MESSAGE: TARGET:
    Project MESSAGE: TARGET:
    @
    This is on win7 64 bit with MinGW dual target 32/64 bit tool chain.

    Anyone knows more details?

    Or how can I detect the tool chain and the target OS properly?

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      The wording "platform" in "this post":http://qt-project.org/faq/answer/how_can_i_detect_in_the_.pro_file_if_i_am_compiling_on_a_32_bit_or_a_64_bi#502 threw me off track.
      The wording platform relates "here":http://qt-project.org/doc/qt-4.8/supported-platforms.html to the OS and its version e.g. "Microsoft Windows 7 (64-bit)" which is in both of my cases identical.
      QMAKE_HOST.arch is changing with the tool chain used. MinGW 32bit shows therefore x86 and the dual target MinGW shows x86_64.
      How and where QMAKE_TARGET can be activated is still not clear to me.

      Vote the answer(s) that helped you to solve your issue(s)

      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