QT5交叉编译出现"undefined reference to `qt_version_tag'"的解决方法

在QT5中进行交叉编译时遇到'undefined reference to `qt_version_tag''的问题,即使环境变量和qmake配置看似正确。通过分析编译日志,发现可能是qmake命令的执行方式不正确。解决方法是在命令行中手动执行qmake,指定.pro文件所在的路径,并确保工作目录正确,避免使用GUI导致的g++直接编译。此方法能有效解决该链接错误。
摘要由CSDN通过智能技术生成

如下图所示:

根据交叉编译的配置,我觉得我的qmake版本是没有配置错误的。


输出的Complie Output的log如下:

22:33:46: Running steps for project untitled...
22:33:46: Starting: "/usr/bin/make" clean
rm -f moc_mainwindow.cpp
rm -f ui_mainwindow.h
rm -f main.o mainwindow.o moc_mainwindow.o
rm -f *~ core *.core
22:33:46: The process "/usr/bin/make" exited normally.
22:33:46: Starting: "/opt/fsl-imx-x11/4.1.15-2.0.0/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake" /home/yuanxin/Desktop/Hello/HelloQT/untitled/untitled.pro -r -spec linux-g++ CONFIG+=debug
22:33:46: The process "/opt/fsl-imx-x11/4.1.15-2

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Engineer-Bruce_Yang

谢谢您

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值