Re: Problem with QMAKESPEC
I'm not familiar with using qmake options to accomplish this. I've always set the QMAKESPEC environment variable to whatever spec I wanted - in this case, I'd set it to 'linux-g++-32'. Try that and see if it makes a difference.
Re: Problem with QMAKESPEC
I had remove qmake option and set QMAKESPEC and with simple test app it works.
When I'm linking external library, compiled for i386 architecture, I'm getting error:
Code:
:: error: i386 architecture of input file `/home/path to lib/libdr.a(libdr.o)' is incompatible with i386:x86-64 output
Re: Problem with QMAKESPEC
Do a 'make clean' on your project; you probably have some previously compiled 64-bit object files in it.
Re: Problem with QMAKESPEC
I made "make clean". Did not help. :(
Re: Problem with QMAKESPEC
Hi, sorry to resurrect such an old post, but I just encountered the very same problem: forcing a 32-bit compilation on a 64-bit machine using -spec linux-g++-32 still uses /usr/lib64 as main library linking path, instead of /usr/lib, which leads to linking problems. I guess it's a bug in spec files or something, and which maybe has been yet solved as the machine I experienced this had a fairly old setup (qmake 4.3.4).
Anyway, for sake of documentation and just in case anyone else stumbles over the same problem, I found a possible workaround, which is adding also QMAKE_LIBDIR=/usr/lib parameter to qmake command line. Although this doesn't remove /usr/lib64 from linking path, at least /usr/lib is inserted BEFORE it, so linker finds first the 32 bit libraries and uses them.
Kind regards.
Re: Problem with QMAKESPEC
If you use the 32-bit qmake from your 32-bit build of Qt then you should get a 32-bit result by default. Are you getting this result using the 32-bit qmake?