编译安装tslib1.4
如果没有安装svn,请sudo apt-get install subversion
然后cd tslib
#export CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc
#echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
#source autogen.sh
//避免检查ac_cv_func_malloc_0_nonnull
#echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
//配置目标机、缓冲、安装路径
#./configure --host=arm-linux --cache-file=arm-linux.cache --prefix=/usr/local/Trolltech/tslib
# make
# make install
也可以: make install-strip 生成瘦身应用程序和库打包(strip的本意是剥光)
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf
export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_FBDEVICE=/dev/fb0
export QWS_MOUSE_PROTO=Tslib:/dev/event0
在开发板/usr/local/tslib/bin目录下执行校准触摸屏程序:
# ./ts_calibrate
从新编译qte-arm
./configure -release -shared -fast -no-largefile -qt-sql-sqlite -no-qt3support -no-xmlpatterns -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -no-webkit -qt-zlib -qt-gif -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -nomake 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-usb -no-glib -qt-mouse-tslib -I/usr/local/Trolltech/tslib/include -L/usr/local/Trolltech/tslib/lib -prefix /usr/locat/Trolltech/q4.5arm
出现错误:
gent.o qscriptcontextinfo.o qscriptstring.o
The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/home/ran/qt4.5/qt-embedded-linux-opensource-src-4.5.0/mkspecs/qws/linux-arm-g++
于是将qmake.conf 文件添加如下内容
中添加了QMAKE_INCDIR=/usr/local/Trolltech/tslib/include
QMAKE_LIBDIR=/usr/local/Trolltech/tslib/lib
还是错。我到交叉编译是3.4.1的。