RasPi and Qt errors!
I have Qt installed on my RasPi 2, and believe to have all correct libraries.
I am trying to create a QtQuick App, and every time I build and try run the app I get the error that modules QML and Quick are unknown.
18:09:44: Running steps for project SatNav...
18:09:44: Starting: "/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake" /home/pi/SatNav/SatNav.pro -r -spec linux-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
Project ERROR: Unknown module(s) in QT: quick qml
18:09:44: The process "/usr/lib/arm-linux-gnueabihf/qt5/bin/qmake" exited with code 3.
Error while building/deploying project SatNav (kit: Unnamed)
When executing step "qmake"
18:09:44: Elapsed time: 00:00.
Anybody know how to fix this?
Are you doing native build on the RasPi 2 ?
If so, did you build all of Qt or just qtbase ?
@SGaist In all honesty I'm not 100%, originally I was following the steps of the native build and whilst leaving to compile for the odd 2 days would have problems and such and then need to restart the process and so on. Following on from that the other day during my searching about saw that it could be done through sudo apt-get install qtcreator.
I'm rather new to using the Pi! Any suggestions how to get this sorted and check different things?
So it seems you have an incomplete build of Qt 5.
Qt Creator installation doesn't mean that you have also a development version of Qt installed.
What exactly did fail when you tried to build Qt 5 ?
@SGaist I will try running the "make" and "sudo make install" again and will get back to you with the output of what's the problem!
Having followed this: https://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi
This time I had no errors, when running which qmake I get : "/usr/bin/qmake" which is different to what is the output in the tutorial above. Furthermore when trying to follow the final stage of compiling the example I get this :
pi@******:~ $ cp -r~/opt/qt5/qtbase/examples/opengl/cube ~/
cp: invalid option -- '~'
Try 'cp --help' for more information.
What are the best next steps to take to solving this?
It's not the same qmake.
Aren't you missing a space between -r and ~ ?
@SGaist Beside that, do you happen to know what I can try as I keep getting "UnKnown Modules: Quick QML"
Did you build the qtdeclarative module ?
Hi, Have simular proplems.
I have done it this way : https://wiki.qt.io/Native_Build_of_Qt5_on_a_Raspberry_Pi
But how i can add quick / qml / declarative modules?
After running ./configure those are missing...
Thank you in advance. :)
Hi and welcome to devnet,
Did you call configure in Qt 5's root directory or in qtbase ?
If the later, simply go in the module folders you are interested in and call
Ensure that you use the correct qmake. Either you have only one and that's the one you build or use the full path so you are sure that you are calling the correct version.
This post is deleted!
Did you install make?
This post is deleted!
I call configure in qtbase. After make and install i manage to build and run ./cube
After that i went to qtdeclartive forlder and run qmake , make and make install with no errors. Maybe i dont use correct qmake. Where in can change path for qmake?
Thank you in advance.
Use the full path to your qmake binary.