gpt4 book ai didi

c++ - Ubuntu 14 中 QtCreator [Yocto Image] 的交叉编译错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:39:43 26 4
gpt4 key购买 nike

Qt Creator 给出了这个库错误:

11:13:12: Running steps for project qtConsoleTest...
11:13:12: Starting: "/usr/bin/make" clean
rm -f main.o
rm -f *~ core *.core
11:13:12: The process "/usr/bin/make" exited normally.
11:13:12: Configuration unchanged, skipping qmake step.
11:13:12: Starting: "/usr/bin/make"
g++ -c -pipe -g -std=gnu++0x -Wall -W -D_REENTRANT -fPIC -DQT_QML_DEBUG -DQT_CORE_LIB -I../qtConsoleTest -I. -isystem /opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/include/qt5 -isystem /opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/include/qt5/QtCore -I. -I/opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi/usr/lib/qt5/mkspecs/linux-g++ -o main.o ../qtConsoleTest/main.cpp
g++ -o qtConsoleTest main.o -lQt5Core -lpthread
/usr/bin/ld: cannot find -lQt5Core
collect2: error: ld returned 1 exit status
make: *** [qtConsoleTest] Error 1
11:13:13: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qtConsoleTest (kit: ce3TunnelBoard)
When executing step "Make"
11:13:13: Elapsed time: 00:01.

基于此Question ,我认为我的问题是 Qt 版本下的 QMAKE_SPEC 和 QMAKE_XSPEC 应该显示 linux-oe-g++(而不是 linux-g++),但我不知道如何更改它。我是否遗漏了任何步骤?

我已经对 Qt5 SDK 进行了 bitbaked,我还在“/opt/Qt5.8.0/Tools/QtCreator/bin/qtcreator.sh”中通过在顶部添加以下内容来获取环境:

source /opt/fsl-imx-x11/4.1.15-2.0.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi

并分别在 Debuggers、Compilers & Qt Versions 下配置以下选项:

/opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
/opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
/opt/fsl-imx-x11/4.1.15-2.0.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake

这些是以防万一的屏幕截图。

I'd appreciate任何帮助。

最佳答案

您最后的屏幕截图显示了一个标记为 Qt mkspec 的文本条目。您应该在此处输入 linux-oe-g++ 以覆盖 c3TunnelBoard 套件的默认值 linux-g++。参见 this link有关如何设置 QtCreator 以与 Yocto 工具链一起使用的更多信息。

关于c++ - Ubuntu 14 中 QtCreator [Yocto Image] 的交叉编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44186446/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com