Why do I get qmake 4.8 in Qt5.0.1 ?
-
Hi,
I downloaded and installed Qt5.0.1 for linux64. However the qmake I got is version 4.8? It's causing problems likeerror: #error "This file was generated using the moc from 4.8.1. It"
error: #error "cannot be used with the include files from this version of Qt."Does anyone have the same problem? Where can I get qmake 5.0? Any help is appreciated.
-
When you type:
@
qmake
@the system uses a PATH to find an executable called "qmake" and it runs the first one it finds. In your case this is likely to be the system version of Qt... Qt 4.8. Type:
@
which qmake
@to see what I mean. Either put the Qt 5.0.1 bin directory in earlier in the path than whatever directory (probably /usr/bin) contains the Qt 4.8 version of qmake, or deliberately spell out the full location of the qmake tyou want to run:
@
/whatever/the/path/is/Qt5.0.1/bin/qmake
@ -
If you use Qt Creator, you can select a desired kit. No manual work is needed then.
-
Otherwise through away the entire "debug and release" directories. Then do a qmake build (this will as Thomas indicated) to regenerate all desired files.
That should do the trick.