zeboard交叉编译Qt5.6.0,程序运行无法加载linuxfb

scgaluo 2016-05-23 04:12:59
使用zeboard官方的交叉编译工具,编译Qt5.6.0,程序无法运行,出错信息如下:
This application failed to start because it could not find or load the Qt platform plugin "linuxfb"
in "/usr/local/Trolltech/Qt-5.6.0-Xilinx/plugins".

Available platform plugins are: linuxfb (from /usr/local/Trolltech/Qt-5.6.0-Xilinx/plugins), minimal (from /usr/local/Trolltech/Qt-5.6.0-Xilinx/plugins), offscreen (from /usr/local/Trolltech/Qt-5.6.0-Xilinx/plugins), linuxfb, minimal, offscreen.

Reinstalling the application may fix this problem.


我指定的环境如下:
#!/bin/sh

echo "Starting qt_env.sh"

mkdir -p /usr/local/
mount /mnt/qt_lib.img /usr/local/

export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_CONFFILE=/usr/local/tslib/etc/ts.conf
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CALIBFILE=/usr/local/tslib/etc/pointercal
export TSLIB_PLUGINDIR=/usr/local/tslib/lib/ts
export PATH=/usr/local/tslib/bin:$PATH

export LD_LIBRARY_PATH=/usr/local/Trolltech/Qt-5.6.0-Xilinx/lib/:$LD_LIBRARY_PATH
export QT_QPA_FONTDIR=/usr/local/Trolltech/Qt-5.6.0-Xilinx/lib/fonts
export QT_QPA_PLATFORM=linuxfb:fb=/dev/fb0
export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/local/Trolltech/Qt-5.6.0-Xilinx/plugins/
export QT_QPA_GENERIC_PLUGINS=evdevmouse:/dev/event0
#if [-c /dev/input/event0];then
# export QWS_MOUSE_PROTO="Tslib:/dev/input/event0 MouseMan:/dev/input/mouse1"
#fi

cd /mnt
./demo &


编译Qt过程如下:
#!/bin/sh

export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
export PATH=/root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/:$PATH

echo yes | ./configure -xplatform arm-xilinx-linux-gnueabi-g++ \
-opensource \
-confirm-license \
-nomake examples \
-skip qtquickcontrols \
-skip qtwebchannel \
-skip qtactiveqt \
-skip qtandroidextras \
-skip qtdeclarative \
-skip qtimageformats \
-skip qtmacextras \
-skip qtserialport \
-skip qtx11extras \
-skip qtxmlpatterns \
-skip qtconnectivity \
-skip qtdoc \
-skip qtenginio \
-skip qtgraphicaleffects \
-skip qtlocation \
-skip qtmultimedia \
-skip qtsensors \
-skip qttools \
-skip qttranslations \
-skip qtwayland \
-skip qtwebchannel \
-skip qtwebengine \
-skip qtwebsockets \
-skip qtwinextras \
-verbose \
-no-gif \
-no-libjpeg \
-no-sql-db2 \
-no-sql-ibase \
-no-sql-mysql \
-no-xcb \
-qt-freetype \
-no-fontconfig \
-no-harfbuzz \
-no-xinput2 \
-no-xcb-xlib \
-no-pulseaudio \
-no-alsa \
-no-gtkstyle \
-no-nis \
-no-cups \
-no-iconv \
-no-icu \
-no-eglfs \
-no-openssl \
-mtdev \
-evdev \
-libinput \
-tslib \
-I/usr/local/tslib/include -L/usr/local/tslib/lib \
-prefix /usr/local/Trolltech/Qt-5.6.0-Xilinx -lrt 2>&1 | tee ../qt5.6.0Xilinxconfiglog
make 2>&1 | tee ../qt5.6.0XilinxMakelog #&& make install

...全文
1037 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
huihui343842420 2017-08-03
  • 打赏
  • 举报
回复
请问一下具体解决方法。
m0_37236304 2017-08-03
  • 打赏
  • 举报
回复
执行程序的时候指定一下平台 ./<app-name> -platform linuxfb
qq_33673304 2016-08-22
  • 打赏
  • 举报
回复
你好,我想问一下您是怎么解决无法加载linuxfb 这个插件这个问题的,今天我也遇到了,要哭了
a411801560 2016-07-28
  • 打赏
  • 举报
回复
楼主,什么原因呀?
scgaluo 2016-06-01
  • 打赏
  • 举报
回复
问题解决
#!/bin/sh

export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
export PATH=/root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/:$PATH

echo yes | ./configure -xplatform arm-xilinx-linux-gnueabi-g++ \
    -opensource \
    -confirm-license \
    -nomake examples \
    -verbose \
    -no-mtdev \
    -no-sql-db2 \
    -no-sql-ibase \
    -no-sql-mysql \
    -no-xcb \
    -qt-freetype \
    -no-harfbuzz \
    -no-xinput2 \
    -no-xcb-xlib \
    -no-pulseaudio \
    -no-alsa \
    -no-gtkstyle \
    -no-nis \
    -no-cups \
    -no-iconv \
    -no-icu \
    -no-eglfs \
    -no-openssl \
    -prefix /usr/local/Trolltech/Qt-5.6.0-Xilinx -lrt 
make -j4 2>&1 | tee ../qt5.6.0XilinxMakelog #&& make install
/home/luo/git/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/arm-xilinx-linux-gnueabi-g++/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)

# modifications to g++.conf
QMAKE_CC   = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-gcc
QMAKE_CXX  = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-g++
QMAKE_LINK = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-g++
QMAKE_LINK_SHLIB = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-g++

# modifications to linux.conf
QMAKE_AR  = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-ar cqs
QMAKE_OBJCOPY  = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-objcopy
QMAKE_NM  = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-nm -P
QMAKE_STRIP = /root/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/arm-xilinx-linux-gnueabi-strip
load(qt_config)
/home/luo/git/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/arm-xilinx-linux-gnueabi-g++/qplatformdefs.h
#include "../linux-g++/qplatformdefs.h"
Little柯南 2016-05-25
  • 打赏
  • 举报
回复
http://blog.csdn.net/Paul_C_V/article/details/40923527 我想这篇博客一定能帮上你
scgaluo 2016-05-23
  • 打赏
  • 举报
回复
编译的信息可以使用如下链接下载
http://pan.baidu.com/s/1jIroFlk

16,211

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧