交叉编译mysql5.7.16_交叉编译Qt5.7

本文详细介绍了如何在Linux环境下,使用arm-linux-gnueabihf-gcc交叉编译工具链,进行MySQL5.7.16和Qt5.7的交叉编译过程。首先安装必要的编译链和tslib,然后下载Qt5.7源码,修改qmake.conf,配置并生成Makefile,完成编译与安装。接着,文章讨论了如何配置tslib的ts.conf文件,并将其库文件复制到开发板。最后,讲解了如何将编译好的Qt5.7库文件拷贝到开发板,以及在Qt Creator中配置交叉编译环境。
摘要由CSDN通过智能技术生成

0.1 准备

(1) 安装交叉编译链,我使用的为:arm-linux-gnueabihf-gcc

(2) 交叉编译tslib,我使用的为厂家编译好的tslib,如果使用电阻式触摸屏必须使用tslib。

(3) 下载Qt5.7源码包

http://download.qt.io/official_releases/qt/5.7/5.7.0/submodules/qt-everywhere-opensource-src-5.7.0.tar.gz

1.1 安装Qtcreator

(1) 下载地址

http://mirrors.ustc.edu.cn/qtproject/archive/qt/5.8/5.8.0/qt-opensource-linux-x64-5.8.0.run

(2) 以root身份运行安装程序,并安装到合适的目录(/opt或/usr/local)

1.2 解压

tar -zxvf /home/chy/qianRuShi/ziliao/qt/qt-everywhere-opensource-src-5.7.0.tar.gz -C /opt/Qt5.8.0/5.8/

1.3 拷贝编译器配置文件

cp ./qtbase/mkspecs/linux-arm-gnueabi-g++ ./qtbase/mkspecs/linux-arm-gnueabihf-g++ -r

1.4 修改qmake.conf

vim ./qtbase/mkspecs/linux-arm-gnueabihf-g++/qmake.conf

内容如下:

c2e9920207824f4094ff84afbe19a676.png

图一

1.5 配置并生成Makefile

./configure -prefix /opt/Qt5.8.0/5.8/Qt5.7_arm_linuxfs/ -opensource -shared -xplatform linux-arm-gnueabihf-g++ -qt-zlib -tslib -no-opengl -nomake examples -skip qtcanvas3d -I/opt/tslib/include -L/opt/tslib/lib -skip qt3d -qreal float -qt-libpng -qt-libjpeg -make libs -skip qtdeclarative

1.6 模块清单

Configure summary

Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)

Building for: linux-arm-gnueabihf-g++ (arm, CPU features: none detected)

Platform notes:

- Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx

Build options:

Configuration .......... accessibility audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus doubleconversion enable_new_dtags evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv inotify ipv6ifname large-config largefile

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值