[Qt-interest] How do I tell with qmake whether system is 64 or32-bit?

Nikos Chantziaras realnc at arcor.de
Fri Jun 10 23:18:55 CEST 2011


I build binaries in virtual machines anyway.  I only do cross compiling 
for building Windows binaries in Linux.  So it's not a problem here.


On 06/11/2011 12:07 AM, Malyushytsky, Alex wrote:
> Correct me if I am wrong.
> This approach assumes you want to build binaries only for the system you are running it.
> In other words your project files will never be used (or display problem if used) when compiling 32 bit code on 64 bit computer or vice versa.
>
> The only way to  fix it seems using it to specify a defaults to be for current system,
> but at  the same time provide an option which can be specified as a parameter for qmake to override it.
>
> Regards,
>      Alex
>
>
> -----Original Message-----
> From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Nikos Chantziaras
> Sent: Friday, June 10, 2011 12:16 AM
> To: qt-interest at qt.nokia.com
> Subject: Re: [Qt-interest] How do I tell with qmake whether system is 64 or32-bit?
>
> Thank you very much, Ben.  This works nicely on Linux too.
>
> On 06/09/2011 10:21 PM, Ben Swerts wrote:
>> Hi Nikos,
>>
>> For quite a few systems you can check the QMAKESPEC, as mentioned before.
>> For Windows, however, you'll need something else. We use this construct:
>>
>> win32:contains(QMAKE_HOST.arch, x86_64) {
>>     LIBS += fmodex64
>> } else {
>>     LIBS += fmodex32
>> }
>>
>> Hope it helps,
>>
>>
>>        Ben
>>
>>> -----Original Message-----
>>> From: qt-interest-bounces+benswerts=telenet.be at qt.nokia.com
>>> [mailto:qt-interest-bounces+benswerts=telenet.be at qt.nokia.com]
>>>    On Behalf Of Nikos Chantziaras
>>> Sent: Wednesday, June 08, 2011 21:25
>>> To: qt-interest at qt.nokia.com
>>> Subject: [Qt-interest] How do I tell with qmake whether
>>> system is 64 or32-bit?
>>>
>>> In a qmake-based project, I need to include different
>>> libraries in the build if the current system is 64-bit.
>>> Something like this:
>>>
>>>      64bit {
>>>          LIBS += fmodex64
>>>      }
>>>      32bit {
>>>          LIBS += fmodex32
>>>      }
>>>
>>> How do I do that?
>>> _______________________________________________
>>> Qt-interest mailing list
>>> Qt-interest at qt.nokia.com
>>> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>>>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
> ---------------------------------------------------------------------------------------------------
> Weidlinger Associates, Inc. made the following annotations.
>
> “This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.”
>
> “Please consider our environment before printing this email.”




More information about the Qt-interest-old mailing list