Qt5 wrong mkspec used in QtCreator
-
Hi all,
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.
Olivier.
-
So you are using a 64bit linux os with a 64bit gcc and a 64bit Qt? linux-g++ is the correct mkspec for you then.
Which version of Qt Creator is this by the way?
-
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?
Olivier.
-
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":http://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.
-
There should not have been changes with regards to creator finding header files in 2.5. Does your project build? If it does, then creator should be able to pick up the headers, too.
-
[quote author="OlivierB" date="1332500652"]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.[/quote]
Qt 5 requires module names in the include path, like:
[code]#include <QtCore/QString>[/code]This no longer works:
[code]#include <QString>[/code]
-
[quote author="Stephen Chu" date="1332504450"]
Qt 5 requires module names in the include path, like:
[code]#include <QtCore/QString>[/code]This no longer works:
[code]#include <QString>[/code][/quote]
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.