歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> tslib的安裝

tslib的安裝

日期:2017/3/3 13:03:07   编辑:Linux技術
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);
}保存後重新編譯即可
Copyright © Linux教程網 All Rights Reserved