I am also in a similar situation, and here is how I work:
I am using a custom version of Qt. I build Qt twice, with the same settings, with the exception of the -platform option, which I set for linux-g ++ - 64 for the first build and linux-g ++ - 32 for the second build. I also use the other -prefix to install both versions in separate directories.
I use QtCreator to build my applications. I added both versions of Qt in the Options â Qt4 â Qt dialog box. Then I set up two different build configurations for my projects with the same build parameters, but with one using a 32-bit Qt dir and one using a 64-bit Qt file. QtCreator then takes care of all the magic, and I just need to alternate between build configurations in order to have both a 32-bit and a 64-bit Qt application. No chroot, no VM, nothing, just a simple build.
However, there is one caveat. To build Qt for 32-bit, obviously, 32-bit versions of most development libraries (X libs, stdlibs, etc.) are required, which are easily accessible on Ubuntu Jaunty with ia32-libs and lib32stdC ++ 6. The only libraries that I could not find for 32-bit development in the architecture with a 64-bit interface, are gstreamer libs, which means that Phonon may not work. I needed Phonon, so I worked on the fact that by building Qt in a virtual machine, then copy the directory installed by Qt to my dev machine.
Good luck.
Fred
source share