QT5.6.0 imx6 平台的交叉编译
参考链接 :https://www.cnblogs.com/oloroso/p/5407779.html
本次IMX6上用的版本是5.6.0,配置为:
./configure \
-v \
-debug-and-release \
-prefix /home/zhang/qt5.6/equipment/qt5.6.0 \
-opensource \
-confirm-license \
-make libs \
-linuxfb \
-pch \
-qt-sql-sqlite \
-qt-zlib \
-qt-libpng \
-qt-libjpeg \
-xplatform linux-arm-imx6-g++ \
-qt-freetype \
-c++std c++98 \
-no-xcb \
-no-opengl \
-no-sse2 \
-no-openssl \
-no-nis \
-no-cups \
-no-glib \
-no-dbus \
-no-iconv \
-no-compile-examples \
-tslib
qmake.conf的内容为:
//#
//# qmake configuration for building with arm-linux-gnueabi-g++
//
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
QMAKE_INCREMENTAL_STYLE = sublib
include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
//#QMAKE_INCDIR += /home/gcp/qt_ARM/tslib/_install/include
//#QMAKE_LIBDIR += /home/gcp/qt_ARM/tslib/_install/lib
QMAKE_INCDIR += /home/zhang/nari/imx6/tslib_lwx/__install/include
QMAKE_LIBDIR += /home/zhang/nari/imx6/tslib_lwx/__install/lib
//# modifications to g++.conf
QMAKE_CC = arm-fsl-linux-gnueabi-gcc
QMAKE_CXX = arm-fsl-linux-gnueabi-g++
QMAKE_LINK = arm-fsl-linux-gnueabi-g++
QMAKE_LINK_SHLIB = arm-fsl-linux-gnueabi-g++
//# modifications to linux.conf
QMAKE_AR = arm-fsl-linux-gnueabi-ar cqs
QMAKE_OBJCOPY = arm-fsl-linux-gnueabi-objcopy
QMAKE_NM = arm-fsl-linux-gnueabi-nm -P
QMAKE_STRIP = arm-fsl-linux-gnueabi-strip
load(qt_config)
如果发生xcbde 缺少的问题的话:
查看/qtbase/src/plugins/platforms/xcb/README
更新一下:
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
或者
sudo apt-get install libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm4 libxcb-icccm4-dev libxcb-sync1 libxcb-sync-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-glx0-dev libxcb-xinerama0-dev
然后make&make install
设置板子上的配置为:
export TSLIB_ROOT=/usr/local/tslib
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIWS_FBDEVICE=/dev/fb0
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONSOLEDEVICE=none
export POINTERCAL_FILE=/etc/pointercal
export QTDIR=/usr/qt
export QT_QPA_FONTDIR=$QTDIR/lib/fonts/
export QT_QPA_PLATFORM=LinuxFb:/dev/fb0
export QT_QPA_PLATFORM_PLUGIN_PATH=$QTDIR/plugins/
export QT_QPA_GENERIC_PLUGINS=Tslib:/dev/input/event0
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=/lib:$QTDIR/lib:$TSLIB_ROOT/lib:$LD_LIBRARY_PATH
运行./hello程序查看结果
- 分享
- 举报
-
浏览量:4393次2020-08-11 10:39:44
-
浏览量:7881次2020-08-14 14:05:35
-
浏览量:2526次2017-11-20 12:34:12
-
浏览量:5340次2019-12-28 10:33:46
-
浏览量:3214次2017-11-21 13:53:36
-
浏览量:4716次2020-03-12 22:02:40
-
浏览量:2153次2018-06-27 17:06:49
-
浏览量:3772次2017-11-21 13:44:59
-
浏览量:8099次2022-04-01 17:16:15
-
浏览量:2722次2020-04-24 17:44:09
-
浏览量:4133次2022-04-01 17:01:16
-
浏览量:2182次2024-02-05 15:51:53
-
浏览量:12110次2020-12-15 19:07:24
-
浏览量:2574次2017-11-20 11:38:57
-
浏览量:4490次2020-07-31 13:45:09
-
浏览量:1339次2024-05-24 19:05:42
-
浏览量:2352次2024-01-18 15:01:07
-
浏览量:2147次2024-01-18 15:07:54
-
浏览量:10265次2021-01-12 20:00:35
-
广告/SPAM
-
恶意灌水
-
违规内容
-
文不对题
-
重复发帖
big_anana
感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明