您的位置:首页 > 其它

tslib的安装

2016-05-08 16:44 405 查看
tslib是嵌入式开发中使用qt开发之前需要搭建的一个必须的环境,通过tslib,你编写的qt程序才能通过触摸屏进行操作,而tslib进行进行你的qt程序和硬件之间的接口,因此,

学会如何搭建tslib是进行嵌入式开发的一个重要的环节。

安装tslib之前需要的在你的linux系统下面安装:

sudo apt-get install automake libtool 如果没有安装,将会出现一些不可预料的错误。

ps:本博主使用的环境是在ubunt 12.04下面的编写tslib环境以及移植到Contex A8平台上面。

使用的tslib-1.0.tar.bz2。 下载链接:http://download.csdn.net/download/kev65629/2029241



$ ./autogen.sh

$ ./configure CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ --prefix=/usr/local/tslib --host=arm-linux-gnueabihf ac_cv_func_malloc_0_nonnull=yes













我自己总结在我的编写过程中遇到的错误。

安装tslib中遇到的错误:./autogen.sh: 4: autoreconf: not found

在arm板上执行./xxx -qws报错:could
not read calibration:"/etc/pointercal"

分享| 2014-01-15 14:09 shanghl417 |浏览
1477次

CPU

我现在在是内核2.6.29,tslib版本1.4的,在板子上执行可执行程序报错could
not read calibration:"/etc/pointercal",点击板子是没有反应

2014-01-15 14:37
提问者采纳

报这个错误是因为你没有进行屏幕校准,或者是pointercal这个文件被删除了。

运行一下:ts_calibrate重新校准一下,这样就能重新生成pointercal文件

./autogen.sh: 4: autoreconf: not found

是在不同版本的
tslib 下执行
autogen.sh 产生。它们产生的原因一样,是

因为没有安装

automake
工具, (ubuntu 8.04)用下面的命令安装好就可以了。

sudo apt-get install autoconf automake libtool

Linux下编译tslib,configure之前都正常,但make后就出现错误啦,求解。。

分享| 2012-03-18 23:14 hc07124988 | 浏览1218
次 悬赏:5

编程语言

终端里最后的内容如下:

In function ‘open’,

inlined from ‘main’at ts_calibrate.c:227:

/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’declared with attribute error: open with
O_CREAT in second argument needs 3 arguments

In function ‘open’,

inlined from ‘main’at ts_calibrate.c:229:

/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’declared with attribute error: open with
O_CREAT in second argument needs 3 arguments

make[2]: *** [ts_calibrate.o] 错误 1

make[2]:正在离开目录 `/opt/qt/tslib/tests'

make[1]: *** [all-recursive] 错误 1

make[1]:正在离开目录 `/opt/qt/tslib'

make: *** [all] 错误 2

2013-12-14 10:07 网友采纳

gcc 新版本编译器对语法检查严格,在源文件 ./tests/ts_calibrate.c中

// 源文件

// if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {

// cal_fd = open (calfile, O_CREAT | O_RDWR);

// } else {

// cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR);

// }

// 需要更改成如下形式

if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {

cal_fd = open (calfile, O_CREAT | O_RDWR, 0777);

} else {

cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR, 0777);

}保存后重新编译即可
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: