[Interest] Compiling 32- and 64-bit versions of Qt 5 on Macintosh

Adam Light aclight at gmail.com
Wed Jan 8 20:12:22 CET 2014


When compiling the Qt 4 libraries using Macintosh 10.6.8, I could pass
the"-arch x86_64 -arch x86" flags to configure and the compiled Qt
libraries would contain both 32- and 64-bit versions.

When compiling Qt 5.2 on the same system, if I use the -arch flag with
configure I'm informed that         "Qt now detects the target and host
architectures based on compiler
        output. Qt will be built using x86_64 for the target architecture
        and x86_64 for the host architecture (note that these two
        will be the same unless you are cross-compiling)."

Though I have not yet tried it, I think I could pass "-platform
macx-g++-32" to get a 32-bit build, and "-platform macx-g++" to get a
64-bit build (the default). But then I'd have two separate sets of binaries
that I'd need to lipo everything together.

Is there a better approach that I'm missing? If not, has anyone else done
this?

We need a 32 bit version of our application because users can (optionally)
use external libraries from the program. We have never had a 64-bit version
on Macintosh, so all existing libraries that users might want to use are
32-bit. Most of the users of these libraries do not have access to the
source code to rebuild, and in some cases the source code is probably lost.
But we'd like our users to continue to be able to use their 32-bit versions
of the libraries so we need a 32-bit version of our app and the Qt
libraries.

Thanks for any help
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20140108/01ebf119/attachment.html>


More information about the Interest mailing list