[SOLVED] What to target on Mac OS X? 32-bit and/or 64-bit?



  • Hi,

    I currently use the "Cocoa: Mac binary package for Mac OS X 10.5 - 10.6 (32-bit and 64-bit)":http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x version of Qt 4.7.3, and I understand that it can be used to build both 32-bit and 64-bit applications.

    Now, because Mac OS X 10.5 supports 64-bit applications, I was wondering whether there is still an argument in favour of having both a 32-bit and a 64-bit version of my application, or whether I could get away with just a 64-bit version of my application?

    Certainly, Apple seems to be encouraging the development of 64-bit applications, and by default if I compile my application on my MacBook Air running OS X 10.6, I get a 64-bit executable. So, I am kind of inclined to only having a 64-bit version of my application, but because I am no Mac expert, I thought I would seek opinions from you guys here...

    Cheers, Alan.



  • For example to have only 32: CONFIG -= x86_64



  • I don't use QMake, but CMake. Still, I think I could get a 32-bit version of my application, if needed. It's just that I am wondering whether there is, nowadays, a need to do that if you want to target Mac OS X 10.5 and above.



  • If you target 10.6 (Snow Leopard only), then 64 bit Intel is sufficient.

    If you target 10.5 (Leopard) too, then I strongly recommend to add at least 32 bit PPC to the universal binaries, 32 bit Intel does not harm too. 10.5 can still run on PowerPC based boxes, and if you do not have any technical reasons it would annoy those users if they cannot run your software.



  • Thanks Volker, that's useful information.

    Considering my user base, I think I would be fine with just a 64-bit version of my application, but just in case and out of curiosity, can one build a 32-bit PPC binary on an Intel system? If so, how?



  • [quote author="DocOx" date="1305208168"]Thanks Volker, that's useful information.

    Considering my user base, I think I would be fine with just a 64-bit version of my application, but just in case and out of curiosity, can one build a 32-bit PPC binary on an Intel system? If so, how?[/quote]

    Yes, the gcc provided by Apple is a cross compiler in that regard. Just add the flags to the .pro file and you're done. Everything else is made behind the scenes.



  • Thanks, I thought it might have been the case. That's very good to know!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.