把Qt-everywhere-4.6.2编译成ARM版本
2013-01-19 13:05
302 查看
把Qt-everywhere-4.6.2编译成ARM版本
唉~真麻烦。每次都出现新的问题。
出错的同志尝试换一下交叉编译器的版本吧。
这次我先用的4.1.2的,结果就出错了。换成4.3.2的就没问题。下次呢?天知道。
configure时参数如下:
./configure -prefix /usr/local/Trolltech/QtEmbedded-4.6.2/ -debug-and-release -no-qt3support -qt-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -nomake examples -nomake demos -nomake docs -no-cups -iconv -xplatform qws/linux-arm-g++ -embedded
arm -little-endian -qt-freetype -depths 8,16,24,32 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -no-dbus -qt-sql-sqlite -qt-kbd-qvfb -qt-kbd-tty -no-glib -qt-mouse-tslib -I /usr/local/tslib/include/ -L /usr/local/tslib/lib/
-D__ARM_ARCH_5TEJ__
编译qt完成后,随便编译一个自带的例子~make时候提示以下错误,用友善的东西时候都没出现这个~郁闷~
lib/libQtGui.so: undefined reference to `ts_read_raw'
/lib/libQtGui.so: undefined reference to `ts_open'
/lib/libQtGui.so: undefined reference to `ts_fd'
/lib/libQtGui.so: undefined reference to `ts_config'
/lib/libQtGui.so: undefined reference to `ts_close'
/lib/libQtGui.so: undefined reference to `ts_read
解决办法:
'修改qt-everywhere-opensource-src-4.7.2/mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):
QMAKE_CC = arm-linux-gcc -lts
QMAKE_CXX = arm-linux-g++ -lts
QMAKE_LINK = arm-linux-g++ -lts
QMAKE_LINK_SHLIB = arm-linux-g++ -lts
按上面的configure配置重新编译qt-everywhere....就可以解决上面编译qt程序时的报错,报错的原因是因为找到不到ts库。
(1)解压tslib-1.4.tar.gz http://www.linuxidc.com/Linux/2011-05/36451.htm
(2)运行./autogen.sh
(3)执行一下命令 :
echo \"ac_cv_func_malloc_0_nonnull=yes\" >$ARCH-linux.cache
./configure --host=arm-none-linux-gnueabi --prefix=/home/tslib --cache-file=$ARCH-linux.cache
编译器的名称和安装的位置可根据自己的情况而定。(最好将编译命令链接为varm-linux-* , 这样在后面更加方便,我是这样做的)
(4)最好执行,make, make install
(5)设置目标板文件系统环境变量
export TSLIB_ROOT=/home/tslib
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
export LD_LIBRARY_PATH=/home/tslib/lib:$LD_LIBRARY_PATH
export QWS_SIZE=320x240
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/home/tslib/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CONFFILE=/home/tslib/etc/ts.conf
export POINTERCAL_FILE=/etc/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/touchscreen-1wire
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=\"LinuxFb:mmWidth100:mmHeight130:0\"
export TSLIB_TSEVENTTYYPE=H3600
export PATH=$PATH:/home/tslib/bin
2、qt/embedded移植
(1)解压文件qt-everywhere-opensource-src-4.7.0.tar.gz
(2)执行
./configure -embedded arm -prefix /home/qt-arm-4.7.0 -release -shared -fast -pch -no-qt3support -no-sql-sqlite -no-libtiff -no-libmng -no-libjpeg -qt-zlib -no-libpng -no-freetype -no-openssl -nomake examples -nomake demos -nomake tools -optimized-qmake -no-phonon
-no-nis -no-opengl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-svg -no-phonon-backend -no-3dnow -no-largefile -no-gif -no-mmx -no-xrender -no-xmlpatterns -no-xkb -no-sm -no-xinerama -no-xshape -no-webkit -no-separate-debug-info -xplatform qws/linux-arm-g++
-depths 16 -no-qvfb -no-gtkstyle -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb -no-mouse-qvfb -little-endian -qt-mouse-tslib -I/home/tslib/include -L/home/tslib/lib
唉~真麻烦。每次都出现新的问题。
出错的同志尝试换一下交叉编译器的版本吧。
这次我先用的4.1.2的,结果就出错了。换成4.3.2的就没问题。下次呢?天知道。
configure时参数如下:
./configure -prefix /usr/local/Trolltech/QtEmbedded-4.6.2/ -debug-and-release -no-qt3support -qt-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -nomake examples -nomake demos -nomake docs -no-cups -iconv -xplatform qws/linux-arm-g++ -embedded
arm -little-endian -qt-freetype -depths 8,16,24,32 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-qvfb -no-gfx-vnc -no-gfx-multiscreen -no-dbus -qt-sql-sqlite -qt-kbd-qvfb -qt-kbd-tty -no-glib -qt-mouse-tslib -I /usr/local/tslib/include/ -L /usr/local/tslib/lib/
-D__ARM_ARCH_5TEJ__
编译qt完成后,随便编译一个自带的例子~make时候提示以下错误,用友善的东西时候都没出现这个~郁闷~
lib/libQtGui.so: undefined reference to `ts_read_raw'
/lib/libQtGui.so: undefined reference to `ts_open'
/lib/libQtGui.so: undefined reference to `ts_fd'
/lib/libQtGui.so: undefined reference to `ts_config'
/lib/libQtGui.so: undefined reference to `ts_close'
/lib/libQtGui.so: undefined reference to `ts_read
解决办法:
'修改qt-everywhere-opensource-src-4.7.2/mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):
QMAKE_CC = arm-linux-gcc -lts
QMAKE_CXX = arm-linux-g++ -lts
QMAKE_LINK = arm-linux-g++ -lts
QMAKE_LINK_SHLIB = arm-linux-g++ -lts
按上面的configure配置重新编译qt-everywhere....就可以解决上面编译qt程序时的报错,报错的原因是因为找到不到ts库。
QT移植 2012.5.9
1、首次移植tslib,在QT中使用和触摸屏有关的库,(1)解压tslib-1.4.tar.gz http://www.linuxidc.com/Linux/2011-05/36451.htm
(2)运行./autogen.sh
(3)执行一下命令 :
echo \"ac_cv_func_malloc_0_nonnull=yes\" >$ARCH-linux.cache
./configure --host=arm-none-linux-gnueabi --prefix=/home/tslib --cache-file=$ARCH-linux.cache
编译器的名称和安装的位置可根据自己的情况而定。(最好将编译命令链接为varm-linux-* , 这样在后面更加方便,我是这样做的)
(4)最好执行,make, make install
(5)设置目标板文件系统环境变量
export TSLIB_ROOT=/home/tslib
export TSLIB_TSDEVICE=/dev/touchscreen-1wire
export LD_LIBRARY_PATH=/home/tslib/lib:$LD_LIBRARY_PATH
export QWS_SIZE=320x240
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/home/tslib/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CONFFILE=/home/tslib/etc/ts.conf
export POINTERCAL_FILE=/etc/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/touchscreen-1wire
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=\"LinuxFb:mmWidth100:mmHeight130:0\"
export TSLIB_TSEVENTTYYPE=H3600
export PATH=$PATH:/home/tslib/bin
2、qt/embedded移植
(1)解压文件qt-everywhere-opensource-src-4.7.0.tar.gz
(2)执行
./configure -embedded arm -prefix /home/qt-arm-4.7.0 -release -shared -fast -pch -no-qt3support -no-sql-sqlite -no-libtiff -no-libmng -no-libjpeg -qt-zlib -no-libpng -no-freetype -no-openssl -nomake examples -nomake demos -nomake tools -optimized-qmake -no-phonon
-no-nis -no-opengl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-svg -no-phonon-backend -no-3dnow -no-largefile -no-gif -no-mmx -no-xrender -no-xmlpatterns -no-xkb -no-sm -no-xinerama -no-xshape -no-webkit -no-separate-debug-info -xplatform qws/linux-arm-g++
-depths 16 -no-qvfb -no-gtkstyle -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb -no-mouse-qvfb -little-endian -qt-mouse-tslib -I/home/tslib/include -L/home/tslib/lib
相关文章推荐
- 把Qt-everywhere-4.6.2编译成ARM版本
- 把Qt-everywhere-4.6.2编译成ARM版本
- 编译qt-arm版本的配置文件
- 编译arm版本的QT遇到的问题
- 基于Arm(OMAP3530)平台的Linux上编译QT4.6.2
- linux下如何利用QtCreator编译ARM版本的Qt程序
- Qt4.6.2已编译二进制版本在VS2005中的问题
- tq2440编译ARM版本的Qt4出错问题解决
- 交叉编译工具和qt安装,终端使用qmake编译arm版本可执行文件的方法
- 在Qt-Extended 4.4.3下编译PC版本的HelloQt4;在Qt-Extended 4.4.3下编译arm版本的HelloQt4
- qt2.2.0 X86版本和arm版本的编译和运行
- 嵌入式ARM版本的Qt编译安装和移植过程
- 将PC版本的QT程序编译为ARM版本
- 交叉编译ARM版 Qt (qt-everywhere-opensource-src-4.8.4)
- 交叉编译ARM版 Qt (qt-everywhere-opensource-src-4.8.4)
- Qt4.6.2已编译二进制版本在VS2005中的问题
- 交叉编译qt-everywhere-opensource-src-4.6.2需要的几个包
- Qt4.6.2已编译二进制版本在VS2005中的问题
- gentoo下编译arm64版本Qt5.5 for android