Results 1 to 3 of 3

Thread: QMAKE_HOST.arch is x86 on a 64 bits machine

  1. #1
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question QMAKE_HOST.arch is x86 on a 64 bits machine

    Hi,

    I'm trying to check if I'm on a 64bits machine or a 32 bits one. So I use this in the .pro file

    Qt Code:
    1. !contains($$QMAKE_HOST.arch, x86_64) { ....
    To copy to clipboard, switch view to plain text mode 

    But it detect that I'm on 32 bits machine... in fact QMAKE_HOST.arch = x86 !!!!

    What is the problem ?

    Thanks

  2. #2
    Join Date
    Oct 2010
    Posts
    95
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMAKE_HOST.arch is x86 on a 64 bits machine

    Nobody has an idea ?

  3. #3
    Join Date
    Oct 2015
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QMAKE_HOST.arch is x86 on a 64 bits machine

    Maybe this answer is a little bit late for you, but I hope it will help to someone:

    QMAKE_HOST contain not an information about machine on which qmake is running, but about current selected build kit.

    For example if you are using MSVC2013_32bit kit on x64 Windows machine - $$QMAKE_HOST.arch will not contain x86_64 but it will contain i386.

    Also, I see no reason to detect host OS architecture as it is should not be significant for your project in any way, on build step.

    Update: I understand strange thing that QMAKE_HOST acting itself as QMAKE_TARGET - it could be a Qt bug, but the fact is that it is working like that now - in Qt 5.5.1. On my opinion QMAKE_HOST - too buggy to use. I prefer QMAKE_TARGET instead.
    Last edited by Youw; 23rd October 2015 at 14:54.

Similar Threads

  1. Replies: 7
    Last Post: 19th April 2011, 13:20
  2. Replies: 2
    Last Post: 22nd December 2009, 21:52
  3. Plugin Arch Questions
    By ComaWhite in forum KDE Forum
    Replies: 1
    Last Post: 1st September 2009, 22:08
  4. Accessing a QBitmap's underlying bits
    By sternocera in forum Qt Programming
    Replies: 5
    Last Post: 6th April 2009, 07:41
  5. Compilation app sous +ieur OS et arch
    By mourad in forum Qt Programming
    Replies: 1
    Last Post: 7th April 2008, 19:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.