交叉编译tslib1.4后,下载到板子上(mini2440),可以正确运行tslib自带的测试程序,
编译qt4.5.3后,运行自己写的qt程序时,触摸屏和鼠标都不能用??
我编译qt4时的步骤(已经编译、安装成功,)
configure -embedded arm -xplatform qws/linux-arm-g++ -fast -no-webkit -no-qt3support -qt-mouse-pc -qt-mouse-tslib -I /opt/tslib_v1.4/include/ -L /opt/tslib_v1.4/lib/ -qt-mouse-pc -qt-kbd-usb -silent -prefix /opt/arm_qte/
make -silent
make install -silent
我的qt程序可以在开发板上正确的显示,但是输入没有效果(鼠标和触摸屏),请问这是怎么回事呀,搞了好久了,好郁闷,,???
------最佳解决方案--------------------
1.编译tslib1.4
tar xzvf tslib-1.4.tar.gz
cd tslib/
export CC=/usr/local/arm/usr/local/arm/3.4.1/bin/arm-linux-gcc
export CXX=/usr/local/arm/usr/local/arm/3.4.1/bin/arm-linux-g++
./autogen.sh
export PATH=/usr/local/arm/usr/local/arm/3.4.1/bin:$PATH
echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache
#./configure PLUGIN_DIR=/home/xgq/tslib/plugins -prefix=/usr/local/tslib4 -host=arm-linux --cache-file=arm-linux.cache 2>&1
------其他解决方案--------------------
tee conf_log
Make
Make install
这样tslib1.4编译安装完毕。
2.编译qtopia core 4.3.3
./configure -prefix /usr/local/Trolltech/qtopiacore_ts -embedded arm -xplatform qws/linux-arm-g++ -depths 8,16,32 -no-qt3support -no-largefile -no-mouse-linuxtp -no-mouse-pc -no-mouse-pc -no-mouse-bus -no-mouse-yopy -no-mouse-vr41xx -no-mouse-qvfb -qt-mouse-tslib -I /usr/local/tslib1.4/include -L /usr/local/tslib1.4/lib 2>&1
------其他解决方案--------------------
tee conf_log (这种颜色的配置加入了触屏支持)
make 2>&1
------其他解决方案--------------------
tee make_log
make install
这样qtopia core 4.3.3也编译完了,够简单吧
3.设置环境变量
#!/bin/sh
export QTDIR=/usr/qt
export QPEDIR=/usr
#export LD_LIBRARY_PATH=/usr/qt/lib
export HOME=/usr
export TSLIB_TSDEVICE=/dev/touchscreen
export TSLIB_FBDEVICE=/dev/fb0
export TSLIB_PLUGINDIR=/usr/qt/tslib4/lib/ts
export TSLIB_CONSOLEDEVICE=none
export TSLIB_CONFFILE=/usr/qt/tslib4/etc/ts.conf
export TSLIB_CALIBFILE=/etc/pointercal
export POINTERCAL_FILE=/etc/pointercal
export QWS_DISPLAY=LinuxFb:mmWidth35:mmHeight45:0
export QWS_SIZE=320x240
export QWS_MOUSE_PROTO=Tslib:/dev/touchscreen
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/qt/tslib4/lib:$QTDIR/lib
4.配置ts.conf
module_raw h3600module
module variance delta=30
module dejitter delta=100
module linear
5.配置rcS
#!/bin/sh
/bin/mount -a
/sbin/ifconfig eth0 192.168.0.15 up
/bin/mknod /dev/can c 98 0
/bin/mknod /dev/touchscreen c 233 0 (我是自己加载驱动所以才有这一步)
/bin/ln -s /dev/sound/dsp /dev/dsp
/bin/ln -s /dev/fb/0 /dev/fb0
具体可访问:http://blog.csdn.net/lishaman/archive/2010/04/30/5547694.aspx