View Full Version : QMAKE_HOST.arch is x86 on a 64 bits machine
pl01
17th November 2010, 13:39
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
!contains($$QMAKE_HOST.arch, x86_64) { ....
But it detect that I'm on 32 bits machine... in fact QMAKE_HOST.arch = x86 !!!!
What is the problem ?
Thanks
pl01
24th November 2010, 20:31
Nobody has an idea ?
Youw
23rd October 2015, 13:29
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.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.