How to compile QT-GUI project with Yocto build
-
Hi all,
I'm new to Qt5 and Yocto build..
I have done couple search and exercise I have successfully build my yocto image for "Licheepi Nano" board.
I have done so far:
a. I have build "core-image-minimal"
b. I have build "core-image-sato"
c. I have build "qt5-image"Additionally.. I have compile c file (hello_world.c). I have compile Qt based application (myqtapp - which contain myQTApp.cpp and myQTApp.pro) by got help from this video link : https://www.youtube.com/watch?v=2HyUCWOQhr8
Now I'm developed QT-GUI application which contain couple files (myTree.pro, main.cpp, mainwindow.cpp, mainwindow.h, mainwindow.ui), please guide me, what are the updated will be there in
a. bblayer.conf,
b. local.conf
c. mytree_0.1.bb
and any other files...Note: my application name is "myTree".
Please guide me.. I have struct from last couple week..
thanks in advance..
-
Hi and welcome to devnet,
This stack overflow answer might help you get going.
-
@SGaist thanks for your quick reply..
The one work for non-graphical or non-wedget application..
I have tried this method with my QT-GUI application .. but it result in error.. not able to compile..Sorry.. Please guide me how to move forward..
-
Which error would that be ?
If you can build the application from the command line it means that your project is defined correctly. If you have an error in yocto it means you likely did not include one or more modules that are required for your application. -
@SGaist thanks for your guidance..
I have result in this errorERROR: mytree-0.1-r0 do_configure: Execution of '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/run.do_configure.663829' failed with exit code 2
ERROR: Logfile of failure stored in: /home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/log.do_configure.663829
Log data follows:
| DEBUG: Executing shell function qmake5_base_preconfigure
| DEBUG: Shell function qmake5_base_preconfigure finished
| DEBUG: Executing shell function do_configure
| ls: cannot access '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0//.pro': No such file or directory
| WARNING: exit code 2 from a shell command.
| ERROR: Execution of '/home/mani/yocto/tmp/work/armv5e-poky-linux-gnueabi/mytree/0.1-r0/temp/run.do_configure.663829' failed with exit code 2
ERROR: Task (/home/mani/yocto/poky/meta-mani/recipes-software/mytree/mytree_0.1.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6810 tasks of which 6802 didn't need to be rerun and 1 failed.Summary: 1 task failed:
/home/mani/yocto/poky/meta-mani/recipes-software/mytree/mytree_0.1.bb:do_configure
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Additional note:
a. I have stored all my file in "/home/mani/yocto/poky/meta-mani/recipes-software/mytree/files" folder
b. mytree_0.1.bb file is in "/home/mani/yocto/poky/meta-mani/recipes-software/mytree" folder- mytree_0.1.bb file as below:
SUMMARY = "Test QT program"
DESCRIPTION = "Test QT program"
LICENSE = "CLOSED"DEPENDS += " qtbase wayland "
SRC_URI = " file://myTree.pro
file://main.cpp
file://mainwindow.cpp
file://mainwindow.h
file://mainwindow.ui
"
TARGET_CC_ARCH += "${LDFLAGS}"S = "${WORKDIR}/*"
do_install_append () {
install -d ${D}${bindir}
install -m 0775 myTree ${D}${bindir}/
}inherit qmake5
- Added in conf/local.conf file as below:
IMAGE_INSTALL_append += " mycapp "
IMAGE_INSTALL_append += " myqtapp "
IMAGE_INSTALL_append += " mytree "
DISTRO_FEATURES_append += " wayland "
IMAGE_INSTALL_append += " qtbase qtwayland "
CORE_IMAGE_EXTRA_INSTALL += " wayland weston "
IMAGE_INSTALL_remove += " connman connman-client connman-plugin-wifi "CONF_VERSION = "1"
RM_OLD_IMAGE = "1"
INHERIT += "rm_work"
please guide me, what was the mistake i have done..
thanks.
-
@rmkmani1001 said in How to compile QT-GUI project with Yocto build:
IMAGE_INSTALL_append += " mytree "
I have successfully executed these two programs.
- IMAGE_INSTALL_append += " mycapp "
- IMAGE_INSTALL_append += " myqtapp "
I have added new line for my QT-GUI as
IMAGE_INSTALL_append += " mytree "Just for information, these three lines are added in end of local.conf file.
CONF_VERSION = "1"
RM_OLD_IMAGE = "1"
INHERIT += "rm_work"thanks..