首先下載tslib-1.4.tar.gz
解壓:tar xzvf tslib-1.4tzr.gz
進入tslib目錄
cd tslib
1.執行./autogen.sh
提示錯誤一:
./autogen.sh: 4: autoreconf: not found
解決方法:sudo apt-get install autoconf automake libtool
2.執行./configure --host=arm-linux --prefix=/usr/local/tslib
提示錯誤二:
ts_test.o(.text+0x218): In function `main':
: undefined reference to `rpl_malloc'
fbutils.o(.text+0x234): In function `open_framebuffer':
: undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_test] Error 1
make[2]: Leaving directory `/home/gfpeak/Desktop/tslib/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gfpeak/Desktop/tslib'
make: *** [all] Error 2
解決方法是在編譯的時候 ./configure 後面的參數沒有設置對,正確設置如下:
./configure --prefix=/usr/local/tslib/ --host=arm-linux ac_cv_func_malloc_0_nonnull=yes
3.執行make
4.執行sudo make install