[英]Cross compilation error with QtCreator [Yocto Image]
I've bitbaked a qt5 image for my Beaglebone Black and exported the cross-toolchain sdk. 我为Beaglebone Black制作了一个qt5图像,并导出了跨工具链sdk。 I also tried to setup QtCreator to work with the output toolchain with the steps in this link 我还尝试通过此链接中的步骤设置QtCreator以使用输出工具链
I put this code at the beginning of the qtcreator.sh file to change the environment variables 我将此代码放在qtcreator.sh文件的开头以更改环境变量
source /opt/poky/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi 源/opt/poky/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
and configured the following options 并配置了以下选项
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? 有人对此有解决方案吗?
PS when I compile the project using terminal it compiles with no error and works well on the target. PS,当我使用终端编译项目时,它编译时没有错误,并且在目标上运行良好。 My host machine is running on Ubuntu 16.0. 我的主机在Ubuntu 16.0上运行。
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. 解决方案是在您在QtCreator中创建的工具包的“ Qt mkspec”中添加linux-oe-g++
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.