交叉编译mysql5.7.16_交叉编译Qt5.7
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
内容如下:
图一
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 linuxfb medium-config minimal-config mremap nis no-pkg-config pcre png poll_ppoll posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config threadsafe-cloexec tslib zlib
Build parts ............ libs
Mode ................... release
Using sanitizer(s)...... none
Using C++ standard ..... c++11
Using gold linker....... no
Using new DTAGS ........ yes
Using PCH .............. yes
Using LTCG ............. no
Target compiler supports:
Neon ................. no
Qt modules and options:
Qt D-Bus ............... yes (loading dbus-1 at runtime)
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... yes
Use system proxies ..... no
Support enabled for:
Accessibility .......... yes
ALSA ................... no
CUPS ................... no
DoubleConversion........ yes (bundled copy)
Evdev .................. yes
FontConfig ............. no
FreeType ............... yes (bundled copy)
Glib ................... no
GStreamer .............. no
GTK platformtheme ...... no
HarfBuzz ............... yes (bundled copy)
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
libinput................ no
Logging backends:
journald ............... no
syslog ............... no
mtdev .................. no
Networking:
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
NIS .................... yes
OpenGL / OpenVG:
EGL .................. no
OpenGL ............... no
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. no
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ no
EGLFS i.MX6 ........ no
EGLFS i.MX6 Wayland. no
EGLFS EGLDevice .... no
EGLFS GBM .......... no
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... no
LinuxFB .............. yes
Mir client............ no
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... yes (plugin, using bundled copy)
TDS .................. no
tslib .................. yes
udev ................... no
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (bundled copy)
1.7 编译并安装
make
make install
2.1 修改tslib的ts.conf文件,如下:
# Uncomment if you wish to use the linux input layer event interface
# module_raw input
# Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d
# module_raw collie
# Uncomment if you're using a Sharp Zaurus SL-C700/C750/C760/C860
# module_raw corgi
# Uncomment if you're using a device with a UCB1200/1300/1400 TS interface
# module_raw ucb1x00
# Uncomment if you're using an HP iPaq h3600 or similar
# module_raw h3600
# Uncomment if you're using a Hitachi Webpad
# module_raw mk712
# Uncomment if you're using an IBM Arctic II
# module_raw arctic2
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
2.2 拷贝tslib库到开发板(可以通过vsftp传到开发板或制作根文件系统)
(1) 打包后通过vsftp传到开发板。
(2) 解压
tar -zxvf ./tslib.tar.zip
(3) 复制tslib/etc/ts.conf到开发板的/etc
cp ./tslib/etc/ts.conf /etc
(4) 复制tslib/bin/下的所有文件到开发板的/usr/bin/
cp ./tslib/bin/* /usr/bin/
(5) 复制tslib/lib/下的所有文件到开发板的/usr/lib/
cp -r ./tslib/lib/* /usr/lib/
(6) 配置环境变量,打开/etc/profile文件,并添加如下内容:
export TSLIB_PLUGINDIR=/usr/lib/ts/
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/etc/ts.conf
export LD_LIBRARY_PATH=/usr/lib
2.3 拷贝Qt5.7的库到开发板(可以通过vsftp传到开发板或制作根文件系统)
(1) 打包后通过vsftp上传到开发板
(2) 解压
tar -zxvf ./lib.tar.zip
(3) 复制./lib下的所有文件到/usr/lib目录下
cp -r ./lib/* /usr/lib
(4) 配置环境变量,打开/etc/profile文件,并添加如下内容:
export QT_QWS_FONTDIR=/usr/lib/fonts
export QWS_MOUSE_PROTO=/dev/input/event0
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/qt-plugins
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QT_QPA_FONTDIR=/usr/lib/fonts
3.1 配置刚刚编译的Qt5.7
(1) 进入Qtcreator的工具->选项->构建和运行
图二
(2) 进入添加编译器,选择[添加]->[GCC]->[C++]
图三
(3) 添加[c]和调试器[gdb]参考第二步
(4) [Qt Versions]->[添加]
图四
(5) [kit] -> [添加],使用刚才添加的gcc、g++、gdb。
图五
3.2 测试
图六
====================================================================================================================================
可能遇到的问题
出现如下问题时安装libiconv
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed
(1) 下载链接:
https://ftp.gnu.org/gnu/libiconv/
(2) 配置并安装安装
echo "CC=arm-linux-gnueabihf-gcc"
./configure --prefix=/home/chy/out --host=arm-linux-gnueabihf
make
make install
(3) 复制preloadable_libiconv.so到开发板的/lib目录,并配置在/etc/profile添加export LD_PRELOAD=/lib/preloadable_libiconv.so
出现如下问题时添加-skip qtdeclarative参数
ProjectERROR: Unknownmodule(s)inQT:quick
make[2]: *** [sub-virtualkeyboard-make_first] Error3
交叉编译mysql5.7.16_交叉编译Qt5.7相关推荐
- 什么是交叉编译?个人对交叉编译的理解
2019独角兽企业重金招聘Python工程师标准>>> 什么是交叉编译?个人对交叉编译的理解 关键词:交叉编译 [一句话概括]:将源代码在A平台使用[某种编译器]去编译,使得生成的二 ...
- 【交叉编译】什么是交叉编译,为何要有交叉编译?
一.交叉编译简介 1.什么是交叉编译 1.1 本地编译 解释什么是交叉编译之前,先要明白一个概念:本地编译 我们之前常见的软件开发,都是属于本地编译:在当前的PC下,x86的CPU下,直接编译出来程序 ...
- 龙芯交叉编译环境搭建之交叉编译工具链配置
龙芯交叉编译环境搭建之 交叉编译工具链配置 1 概括 本文档适用于龙芯3A3000/4000 UEFI代码编译,重点指导交叉编译环境的搭建方法,对系统安装不做介绍. Ubuntu系统(版本为ubun ...
- ubuntu18.04交叉编译移植OpenCV4.70和QT5.12.12至ARM64位平台LKD3588(开发板为ubuntu22.04系统)(三)
序:前面已经将Opencv和Qt5.12.12分别交叉编译并部署至RK3588中开发板上了,并验证了在开发板上都可以顺利运行.接下来我们在PC虚拟机QT上搭建将二者结合的IDE便于开发. 一.虚拟机中 ...
- 交叉编译出现skipping incompatible_交叉编译bluez-5.50
环境:ubuntu 14.04 目标:arm板 交叉编译器:arm-poky-linux-gnueabi-gcc 5.3.0 configure参数 ./configure --prefix=/hom ...
- 【Android 安装包优化】使用 lib7zr.so 动态库处理压缩文件 ( 修改 7zr 交叉编译脚本 Android.mk | 交叉编译 lib7zr.so 动态库 )
文章目录 一.修改 7zr 交叉编译脚本 Android.mk 二.完整的 7zr 交叉编译脚本 Android.mk 三.交叉编译 lib7zr.so 动态库 四.参考资料 一.修改 7zr 交叉编 ...
- 【Android NDK 开发】Ubuntu 函数库交叉编译 ( Android 动态库交叉编译 | Android 静态库交叉编译 )
文章目录 I . Ubuntu 中交叉编译 Android 动态库 II . Ubuntu 中交叉编译 Android 静态库 I . Ubuntu 中交叉编译 Android 动态库 1 . 要编译 ...
- cmake交叉编译android,CMake Android 交叉编译
众所周知,AS现在可以利用Grandle调用cmake,实现c++代码在Android平台上的交叉编译.但是大多是情况下,项目代码不是从零开发,而是在现有代码的基础上移植到Android平台上.这种情 ...
- arm-linux 交叉编译后程序,ARM交叉编译下,应用程序实践
ARM交叉编译下,应用程序实践 一.首先准备一个小程序 hello.c 代码如下: #include int main(void) { printf("hello,world\n" ...
最新文章
- 在 Linux 上使用 lspci 命令查看硬件情况
- 当医疗健康加上大数据,会碰撞出什么火花?
- 为什么说现在是计算机视觉最好的时代?
- 测试面试话题5: 如何不漏测
- Pandas简明教程:三、Pandas文件读写
- WinCE 开始菜单StartMenu_Create()函数代码分析
- JAVA :RESTLET开发实例(一)基于JAX-RS的REST服务
- Blazor Hydra——在单个站点上托管多个Blazor SPA
- @开发者 区块链技术如此火爆 你却只能望而却步?京东云为你配齐装备!
- MySQL(八)事务的隔离级别
- 信息量、信息熵、交叉熵、KL散度、JS散度、Wasserstein距离
- Batch Normalization 算法解析
- EXCEL 数据透视表的制作
- 即时通讯源码对企业到底有多重要呢?
- 强大视频电影播放软件——乐鱼影音盒!
- you need to install the latest version of Visual Studio
- 南航里程每年清空吗_年末提醒| 除了换机票,那些即将清零的航空里程还有什么用...
- 基于Springboot的社区志愿者服务管理系统
- 物联网毕业设计 - 基于单片机的自动写字机器人
- 免费领取三个月苹果ARCADE订阅教程