Results 1 to 4 of 4

Thread: qmake: detecting x86_64 architecture?

  1. #1
    Join Date
    Jun 2008
    Posts
    49
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question qmake: detecting x86_64 architecture?

    I'm looking at the qmake documentation, and I wonder if it's possible to detect the architecture in detail of the system that qmake is being run on. I see the UNIX / WIN32 / MACX defined, but this is not detailed enough. I'd like to see separate linux x86 and x86_64, for example.

    I saw some threads, like http://lists.trolltech.com/qt-intere...ad00343-0.html , but none if these seem to be conclusive. Nor did I find anything conclusive on the undocumented qmake site.

    Is there a way to safely tell the nature of the arch one is building on?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: qmake: detecting x86_64 architecture?

    The link you gave shows an example:
    *-g++-32 {
    message("Any 32-bit GCC build")
    }
    You can do it the according way for 64-bit.
    J-P Nurmi

  3. #3
    Join Date
    Jun 2008
    Posts
    49
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake: detecting x86_64 architecture?

    Quote Originally Posted by jpn View Post
    The link you gave shows an example:

    You can do it the according way for 64-bit.
    yes, but this actually doesn't work out of the box, as QMAKESPEC is set to linux-g++, not linux-g++-64 on a 64 bit box. neither is it set for linux-g++-32 on a 32 bit box, by default.

    is there a way to detect the exact platform in a generic manner?

  4. #4
    Join Date
    Jun 2008
    Posts
    49
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake: detecting x86_64 architecture?

    moreover, it seems that the mkspecs for qmake are not really named in a comprehensive way. for example you have linux-g++-32 and linux-g++-64 - but it is not obvious which architecture these mean? linux runs on a wide range of 32 and 64 bit operating architectures, ranging from intel (both 32 and 64 bit), sparc (both 32 and 64 bit), power, etc.

    it might be that Qt itself is not ported to all of these, but for now I'm just looking at qmake as a cross-platform buiilding tool...

Similar Threads

  1. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  2. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15

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.