提示错误:
./autogen.sh: 4: autoreconf: not found
解决方法:
sudo apt-get install autoconf automake libtool
(5)配置生成makefile的相关功能性属性及编译条件
使用下面的语句
$ sudo ./configure --prefix=/opt/tslib/ CC=arm-linux-gnueabihf-gcc --host=arm-linux ac_cv_func_malloc_0_nonnull=yes #--enable-inputapi=no
--enable-inputapi=no:看你的触摸屏驱动是否支持ioctl操作,如果支持就不用写上,不支持就要添上,如果不添加会有
ts_open:Inappropriate ioctol for device
ts_open: No such file or directory
等错误(网上别人的文档是这么说的,我没有试过不加这个参数会怎样,感兴趣的试一下)
(6)编译tslib库
$ sudo make -j4
执行 make 出错:error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
解决方法:
修改cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR ,0777)(据说是交叉编译器版本问题)
(7)安装编译好的支持触摸屏的tslib库
$ sudo make install
问题汇总:
1 错误:
The test for linking against libxcb and support libraries failed!
You might need to install dependency packages, or pass -qt-xcb.
See src/plugins/platforms/xcb/README.
解决方式:
./configure -prefix /opt/qt-5.5.1-arm -opensource -nomake tests -nomake examples -opensource -xplatform linux-arm-gnueabi-g++ -tslib -I/opt/tslib/include -L/opt/tslib/lib -qt-xcb
2 错误:由于在配置生成makefile时,tslib库的安装路径与配置路径不一致导致。
The tslib functionality test failed!