解壓安裝tslib
# tar -zxvf tslib-1.4.tar.gz
# cd tslib
# ./autogen.sh
#echo “ac_cv_func_malloc_0 _nonnull=yes”>arm-linux.cache
# ./configure –host=arm-linux –cache-file=arm-linux.cache -prefix=/usr/local/tslib ac_cv_func_malloc_0_nonnull=yes
# make
# make install
這裏需要注意的是ac_cv_func_malloc_0_nonnull=yes ,不加這句的話會出現編譯錯誤,echo “ac_cv_func_malloc_0 _nonnull=yes”>arm-linux.cache 也是爲了解決這個錯誤,後來有次發現echo 不起作用,便把參數直接加入了./configure
錯誤如下:
ts_test.o: In function main':
rpl_malloc’
ts_test.c:(.text+0x1d4): undefined reference to
fbutils.o: In function open_framebuffer':
rpl_malloc’
fbutils.c:(.text+0x9f4): undefined reference to
collect2: ld returned 1 exit status
![這裏寫圖片描述](https://img-blog.csdn.net/20170608231810263?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYTExNzE5MzY3Njc=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)