Results 1 to 3 of 3

Thread: -spec to use when compiling for 32-bit MacOS X on Snow Leopard? (no macx-g++-32?)

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

    Default -spec to use when compiling for 32-bit MacOS X on Snow Leopard? (no macx-g++-32?)

    I'm trying to compile a qmake-based project on MacOS X 10.6 (Snow Leopard), which will generate 64 bit code as a default. But, I need to create a 32 bit binary.

    On Linux with the same setup, I can simply specify -spec linux-g++-32, and qmake create a 32 bit target. but I'm not finding a macx-g++-32 spec to specify on MacOS X. in fact, what I'm finding is are related to compiler version differences, like macx-g++-40 and macx-g++-42.

    I wonder how I should specify my intention to qmake that I'm looking for a 32 bit target? should I create my own spec based on macx-g++, with -m32 added to QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS?

  2. #2
    Join Date
    Aug 2006
    Posts
    77
    Thanks
    14
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: -spec to use when compiling for 32-bit MacOS X on Snow Leopard? (no macx-g++-32?)

    Hi!

    Just add CONFIG+=x86 to your *.pro file.

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

    Default Re: -spec to use when compiling for 32-bit MacOS X on Snow Leopard? (no macx-g++-32?)

    Quote Originally Posted by kemp View Post
    Hi!

    Just add CONFIG+=x86 to your *.pro file.
    yes, this is what I did, and it worked!

    thank you!

Similar Threads

  1. Replies: 0
    Last Post: 1st April 2011, 17:47
  2. Qt 4.6.x on MacOS X Snow Leo - compiling with g++ in Terminal window?
    By cargath in forum Installation and Deployment
    Replies: 2
    Last Post: 16th May 2010, 22:55
  3. Replies: 0
    Last Post: 28th April 2010, 02:22
  4. PyQt4 on Snow Leopard in 64 bit
    By bgturk in forum Installation and Deployment
    Replies: 0
    Last Post: 15th September 2009, 20:53
  5. snow leopard broke my QT
    By rogerholmes in forum Installation and Deployment
    Replies: 11
    Last Post: 2nd September 2009, 08:18

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.