QQmlApplicationEngine no such file or directory
I am developing a QT app for rpi 0 w. I have used buildroot to create my own image. This is the buildroot config for qt5 package.
I am able to run qt sample applications with no problem.
I am developing the app on Windows PC with Qt Creator 4.10.2 (Based on Qt 5.13.2 (MSVC 2017, 32 bit))
I can build and run the app on the Windows PC
- I am using the Buildroot's qmake to build the qt app for target deploying.
- I add the buildroot's bin directory to environment variables (export PATH=$(pwd)/output/host/bin:$PATH)
- Go into the project's directory
Here I get the next error:
/home/ibercomp/rcr/projects/cp4/buildroot/output/host/bin/arm-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/ibercomp/rcr/projects/cp4/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot -O2 -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I../../buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5 -I../../buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui -I../../buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtCore -I. -I../../buildroot/output/host/mkspecs/devices/linux-buildroot-g++ -o main.o main.cpp
main.cpp:2:33: fatal error: QQmlApplicationEngine: No such file or directory
Any idea of what I am missing?
@jsulm are you meaning that with my configuration I have not included the QML module?
Sorry for my ignorance but I am new on qt
I have not included the QML module?
Looks like QML is not part of your Qt installation..
You can also search for QQmlApplicationEngine header file in your Qt installation.
Solved, I think the problem was with the .pro file. I do not how but it was not corresponding with the one generated with QtCreator. Maybe it was autogenerated when trying the qmake command, it is possible?
qmake -projectgenerates a .pro file but it does not do deep inspection so you have to check its content and add the parts that it does not know about. For example the modules that you are going to use beside the defaults.