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程序查看结果

免责声明:文章内容来自互联网,本站不对其真实性负责,也不承担任何法律责任,如有侵权等情况,请与本站联系删除。
转载请注明出处:QT5.6.0 imx6 平台的交叉编译 https://www.yhzz.com.cn/a/21559.html

上一篇 2023-08-15
下一篇 2023-08-15

相关推荐

联系云恒

在线留言: 我要留言
客服热线:400-600-0310
工作时间:周一至周六,08:30-17:30,节假日休息。