qt 5.14.2 arm 交叉环境搭建过程

主要参考
https://blog.csdn.net/anmo_moan/article/details/126960630
https://blog.csdn.net/a648642694/article/details/89302843

1 下载编译器&设置

1.1 gcc-linaro-12.2.1-2023.01-x86_64_arm-linux-gnueabihf.tar.xz 下载编译器

1.2. /home/zsf/arm linaro 压缩包复制到此目录 并解压

1.3. 添加path
1.3.1 》 gedit ~/.bashrc 最后一行添加 linaro的bin路径
1.3.2 export PATH=$PATH:/home/zsf/arm/gcc-linaro-12.2.1-2023.01-x86_64_arm-linux-gnueabihf/bin
1.3.3 查看 arm-linux-gnueabihf-gcc -v
1.3.4 使用armgcc 没有问题
》 arm-linux-gnueabihf-gcc testArmGCC.c -o arm

	#include <stdio.h>
	int main()
	{
		printf("hello arm gcc");
		return 0;
	}

2 qt源代码包

2.1 qt-everywhere-src-5.14.2.tar.xz 解压
2.2. 修改 qmake.conf,配置相关的编译器,默认使用arm-linux-gnueabi前缀
2.3 ./qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
参考 : https://zhuanlan.zhihu.com/p/587698754

2.4 配置编译选项
./configure -prefix /home/zsf/arm/qt-everywhere-src-5.14.2/armqt-5.14.2 -opensource -confirm-license -release -strip -shared -xplatform linux-arm-gnueabi-g++ -optimized-qmake -c++std c++11 --rpath=no -pch -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtwayland -skip qtwebengine -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -make libs -make examples -nomake tools -nomake tests -gui -widgets -dbus-runtime --glib=no --iconv=no --pcre=qt --zlib=qt -no-openssl --freetype=qt --harfbuzz=qt -no-opengl -linuxfb --xcb=no --libpng=qt --libjpeg=qt --sqlite=qt -plugin-sql-sqlite -recheck-all

3 注意

3.1 python命令

/* ubuntu 18.04 python 3 改成python 2*/
参考 https://www.cnblogs.com/SamFang/p/14316969.html

3.2 错误需改

/home/zsf/arm/qt-everywhere-src-5.14.2/qtdeclarative/src/qmldebug/qqmlprofilerevent_p.h
#include <limits> // add by zsf

4 make & install

make -j4
make install #安装
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值