Qt5 wrong mkspec used in QtCreator
I have build a Qt5 under a Linux 64bits.
Now I try to use it in QtCreator. But, even with the GCC x86_64 set and QMKSPECS set to linux-g++-64, the qmake build step indicates “qmake application.pro -r -spec linux-g++”. And of course, it does not work at link time because Qt5 libs are 64bits…
Anyone has the same problem.
Thanks Tobias for your answer.
Ok. I use the QtCreator from the SDK, so it is 2.4.1.
I was confused with the link error. I took the wrong road…
My .pro contained Qt4 modules which of course are not the same for Qt5.
So in the end, it is just that the current version of QtCreator seems not compatible with Qt5. I think this is normal?
AFAIK Qt Creator can build Qt5 applications.
The wizards, etc. are not yet updated though: Qt5 is not out yet and was a long way of when we released the 2.4 version of Qt Creator. It made little sense back then to update the wizards since the rearrangement of modules and classes was not even done!
Please try Qt Creator 2.5 (beta was just released) for Qt5 work. That should work better. Please file bug reports [bugreports.qt-project.org] if you run into trouble:-)
I am able to build and run Qt5 application using QtCreator 2.4.1. As you say my problem came from the project creation wizard which still create project for Qt4, nothing abnormal here. So after manually update the .pro, the build works.
The problem I have is that QtCreator only find includes from qtbase module and not for qtdeclarative module for example. I’ll give a try to the 2.5 see if it works better.
Qt 5 requires module names in the include path, like:
- #include <QtCore/QString>
This no longer works:
Ok. My computer must by haunted!
For me, with the 2.5, I can use #include <QString> or #include <QQuickView> without a problem.
However, with the 2.4, I can’t even write #include <QtQuick/QQuickView> as QtQuick/ is not found.