分类: LINUX
2008-12-02 21:51:32
Qt-Embedded 1、安装Qt-Embedded-linux 安装Qt-Embedded-linux有两种方法,一种是从源码安装,一种是直接安装。如果不需要在PC机上进行Qt-Embedded程序调试,可以不需要安装Qt-x11和Qt-Embedded for x86 (1) 源码安装 首先从 ftp://ftp.trolltech.com/qt/source/ 下载以下源码包: qt-x11-opensource-src-4.4.1.tar.bz2 qt-embedded-linux-opensource-src-4.4.0.tar.bz2 安装Qt-x11 # tar jxvf qt-x11-opensource-src-4.4.1.tar.bz2 # cd qt-x11-opensource-src-4.4.0 # echo "yes" | ./configure # make && make install 安装Qt-Embedded for x86 # tar jxvf qt-embedded-linux-opensource-src-4.4.0.tar.bz2 # mv qt-embedded-linux-opensource-src-4.4.0 qt-embedded-linux-opensource-src-4.4.0-x86 # cd qt-embedded-linux-opensource-src-4.4.0-x86 # echo "yes" | ./configure \ -prefix /usr/local/Trolltech/QtEmbedded-4.4.0 \ -release \ -shared \ -no-qt3support \ -no-xmlpatterns \ -no-svg \ -no-webkit \ -system-zlib \ -qt-gif \ -system-libtiff \ -system-libpng \ -qt-libmng \ -system-libjpeg \ -make libs \ -make tools \ -nomake examples \ -nomake docs \ -nomake demo \ -no-nis \ -no-cups \ -no-iconv \ -no-dbus \ -no-openssl \ -xplatform qws/linux-x86-g++ \ -embedded x86 \ -qt-freetype \ -depths 16,18 \ -qt-gfx-qvfb \ -no-gfx-transformed \ -no-gfx-multiscreen \ -no-gfx-vnc \ -no-gfx-linuxfb \ -qt-kbd-tty \ -qt-kbd-usb \ -qt-kbd-qvfb \ -qt-mouse-pc \ -qt-mouse-qvfb \ -no-glib # make && make install 安装Qt-Embedded for ARM # tar jxvf qt-embedded-linux-opensource-src-4.4.0.tar.bz2 # mv qt-embedded-linux-opensource-src-4.4.0 qt-embedded-linux-opensource-src-4.4.0-arm # cd qt-embedded-linux-opensource-src-4.4.0-arm # echo "yes" | ./configure \ -prefix /opt/Trolltech/QtEmbedded-4.4.0 \ -release \ -shared \ -no-qt3support \ -no-xmlpatterns \ -no-svg \ -no-webkit \ -system-zlib \ -qt-gif \ -system-libtiff \ -system-libpng \ -qt-libmng \ -system-libjpeg \ -make libs \ -make tools \ -nomake examples \ -nomake docs \ -nomake demo \ -no-nis \ -no-cups \ -no-iconv \ -no-dbus \ -no-openssl \ -xplatform qws/linux-arm-g++ \ -embedded arm \ -little-endian \ -qt-freetype \ -depths 16,18 \ -qt-gfx-linuxfb \ -no-gfx-transformed \ -no-gfx-multiscreen \ -no-gfx-vnc \ -no-gfx-qvfb \ -qt-kbd-tty \ -qt-kbd-usb \ -qt-mouse-tslib \ -qt-mouse-pc \ -no-glib # make && make install 2、程序调试和帮助 在PC机上调试Qt-Embedded程序的方法为,使用Qt-Embedded for x86的Qt库来编译Qt-Embedded程序,然后使用Qt-x11的qvfb工具仿真调试。下面以demo程序为例: # tar jxvf demo.tar.bz2 # cd demo # /usr/local/Trolltech/QtEmbedded-4.4.0/bin/qmake -project # /usr/local/Trolltech/QtEmbedded-4.4.0/bin/qmake # make # /usr/local/Trolltech/Qt-4.4.0/bin/qvfb & # ./demo -qws 远行以下程序可以查看Qt编程,调试,应用,布署等各方面的帮助。 # /usr/local/Trolltech/Qt-4.4.0/bin/assistant 3、将Qt-Embedded程序运行在目标板上 用Qt-Embedded for ARM编译Qt-Embedded应用程序,以demo为例: # tar jxvf demo.tar.bz2 # cd demo # /opt/Trolltech/QtEmbedded-4.4.0/bin/qmake -project # /opt/Trolltech/QtEmbedded-4.4.0/bin/qmake # make 将demo程序下载到目标板上,然后就可以运行demo程序。在运行程序前以下环境变量必须已经设置。 export QTDIR=/opt/Trolltech/QtEmbedded-4.4.0 export PATH=$QTDIR/bin:$PATH export QWS_DISPLAY=LinuxFb:/dev/fb0 export QWS_SIZE=640x480 export QWS_SW_CURSOR=1 export QWS_MOUSE_PROTO=Tslib:/dev/ep93xx_ts export QWS_KEYBOARD=TTY:/dev/tty0 export QT_ONSCREEN_PAINT=0 export PONTERCAL_FILE=/etc/pointercal export LD_LIBRARY_PATH=$QTDIR/lib:/lib:/usr/lib:$LD_LIBRARY_PATH export TSLIB_TSDEVICE=/dev/ep93xx_ts export TSLIB_CALIBFILE=/etc/pointercal export TSLIB_CONFFILE=/etc/ts.conf export TSLIB_PLUGINDIR=/lib/ts export TSLIB_CONSOLEDEVICE=/dev/tty export TSLIB_FBDEVICE=/dev/fb0 |
chinaunix网友2009-01-07 17:34:51
非常好,顶,看了你的文章我成功编译qt-embedded. 但是我有个疑问,-system-libtiff \-system-libpng \--system-libjpeg \ 我使用以上三个开关会出错,我都把他们改成qt-libtiff qt-libpng qt-libjpeg就可以了, 这个两个的区别是什么呢?