Cross compilation error with QtCreator [Yocto Image]

自古美人都是妖i 提交于 2019-12-12 04:45:10

问题


I've bitbaked a qt5 image for my Beaglebone Black and exported the cross-toolchain sdk. I also tried to setup QtCreator to work with the output toolchain with the steps in this link

I put this code at the beginning of the qtcreator.sh file to change the environment variables

source /opt/poky/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi

and configured the following options

  • qmake: /home/user/cross/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake
  • g++ compiler: /home/user/cross/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
  • Sysroot: /home/user/cross/sysroots/cortexa8hf-neon-poky-linux-gnueabi

However, when I build the project I get the following errors :

error: cannot find -lQt5Widgets error: cannot find -lQt5Core error: cannot find -lQt5Gui error: collect2: error: ld returned 1 exit status

Does anybody have a solution for this?

P.S. when I compile the project using terminal it compiles with no error and works well on the target. My host machine is running on Ubuntu 16.0.


回答1:


I found the answer to this in case somebody has the same issue.

the solution is to add linux-oe-g++ in the "Qt mkspec" of the kit you created in the QtCreator.



来源:https://stackoverflow.com/questions/41960709/cross-compilation-error-with-qtcreator-yocto-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!