Possible Bug In QMake
All I am trying to compile a 32 bit application in a 64 bit environment, however QT is forcing the use of the 64 bit libraries during linking time. I am positive I have the 32 bit libraries, and I am using the QMAKESPEC=linux-g++-32. Could anyone offer any advice?
- /usr/lib/i386-linux-gnu contains all Qt Libraries (QtCore, QtGui ... etc)
Then (Notice the wrong directory):
@g++ -m32 -Wl,-O1 -o output [redacted.o] -L/[some_lib_dir] -L/usr/lib/x86_64-linux-gnu -lQtCore -lpthread@
I believe that Qmake is using QT_INSTALL_LIBS, since
@qmake -query QT_INSTALL_LIBS@
@qmake -set QT_INSTALL_LIBS /usr/lib/i386-linux-gnu@
won't over write it though!
Hi and welcome to devnet,
Since you have both installed, you should call the 32 bit Qt qmake. It should be something like:
And you should be good to go
Hey SGaist thank you for the response.
I thought that might be the situation but I couldn't find another qmake binary. Perhaps I'm missing a package? Any suggestions? I'll look more Monday.
Also I still want to point out that this shouldn't be the fix if we're using qmakespec files (which I think are similar to cmake toolchain files). In other words qmake should take its directories from the qmake spec file.
Look for qt4-qmake for i386
IIRC, the difference between the two mkspecs are essentially build flags not paths (some of them are hard-coded in qmake).
That package does not exist in my repos, I'll see if I can find a ppa