[Resolved]qmake i386 vs i386:x86-64
-
I've recently upgraded my system to ubuntu 12.04 based Mint 13 KDE 64 bit, and I'm trying to test out qmake by compiling a c++ file via 'alphaPlusConnector.pro' (which I've successfully done on a past system) issuing these commands:
$ qmake -o Makefile ./alphaPlusConnector.pro
$ makeand after 'make' I'm getting this error:
g++ -m64 -Wl,-O1 -o alphaPlusConnector alphaPlusConnector.o -L/usr/lib/x86_64-linux-gnu -lmysqlpp -lQtGui -lQtCore -lpthread
/usr/bin/ld: i386 architecture of input file `alphaPlusConnector.o' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status
make: *** [alphaPlusConnector] Error 1How can I remedy this issue?
-
I re-ran qmake on 'alphaPlusConnector.pro' on the current system. I assume this rebuilt alphaPlusConnector.o?
-
bq. I re-ran qmake on ‘alphaPlusConnector.pro’ on the current system. I assume this rebuilt alphaPlusConnector.o?
I would have guessed that you used an old build where the objects were already created by the older 32bit compiler. Now you are using the new 64bit tools, but the old objectfile still remains with its old timestamp in its old 32bit form. So make doesn't see the need for rebuilding the objectfiles.
The commands
make clean will remove the old objectfiles and
make will recompile the old files and link everything together.qmake does not compile anything but the .pro file into makefiles (and some other things with ui files).