[SOLVED] include problem in QtCreator/Raspberry
I'm new to Qt and Raspberry programming, I've just installed the qtonpi 0.2 on my device and setupd my QtCreator for cross compiling according to the tutorial in http://qt-project.org/wiki/Create .
I'm now trying to cross compile the hello-qtonpi sample but meet some problems. I am using QtCreator which I already installed on my Debian wheezy distro (QTcreator 2.5.0 based on Qt 4.8.1 32 bits). When I try to cross compile for the RPi, the line "#include <QtQuick>
" is not recognized and I get
hello-qtonpi/main.cpp:2: error: QtQuick: No such file or directory
For me it seems to be a path problem, so I included :
INCLUDEPATH += /opt/qt5/include/
to no avail ...
I added :
INCLUDEPATH += /opt/qt5/include/QtQuick/
and now get:
/opt/qt5/include/QtQuick/qsgmaterial.h:46: error: qopenglshaderprogram.h: No such file or directory
I'm a bit lost ...
What should I do to fix this ?
Looks like something gone wrong with your QtCreator settings. Check this step again:
bq. Selecting Qt 5 for Raspberry Pi
In Qt Creator, select Tools -> Options -> Build & Run and Qt Versions tab
Select Manual and click on Add…
Then select qmake file located in ‘’/opt/qt5/bin/qmake’‘ and click on Open
Click on Apply and select OK
Thanks for the fast answer.
I followed the steps you mention, but it appear that it was already correctly configured. I got the same error on building the sample.
For sure it looks like a misconfiguration of QtCreator, but I don't see where ...
Maybe it has something to do with your Debian wheezy? I have never had problems with cross-compiling Qt5 apps for RPi. I have used Fedora, ubuntu or LFS for that... Can you try it with Fedora or ubuntu in VirtualBox?
I finally got it :
Following the tutorial, I had set the "Run" settings of the hello-qtonpi project (using the "projects" button on the left hand side of QtCreator), but I left the "build" settings to the defaults.
They were set to use the Qt 4.8 version which I had already before installing the Qtonpi sdk.
I changed this to the Qt 5.0 version and all went smoothly !
Please add "[SOLVED]" prefix left to the topic subject. Thanks!