qt usb鼠标编译

在尝试编译QT以支持ARM架构并连接USB鼠标时遇到错误,编译选项包括-no-mouse-qvfb、-qt-mouse-linuxinput和-qt-mouse-tslib。错误提示libts-0.0.so.0库未找到。解决方案是将/usr/local/tslib/lib下的libts-0.0.so.0和libts-0.0.so.0.1.0库文件复制到编译器库目录/home/nzm/toolchain/arm-2008q1/arm-none-linux-gnueabi/lib/,并在板上设置环境变量QWS_MOUSE_PROTO为"tslib:/dev/input/event1 usb:/dev/input/event2"。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

配置:

./configure -prefix /home/nzm/qt/arm-qt4 -fast -no-largefile -no-qt3support -no-mmx -no-3dnow -no-xmlpatterns -no-webkit -no-svg -nomake demos -nomake docs -no-openssl -embedded arm -little-endian -no-qvfb -no-mouse-qvfb -depths 32,16,24 -confirm-license -xplatform qws/linux-arm-g++ -no-xcursor -no-xfixes -qt-mouse-linuxinput -qt-mouse-pc -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib


出错:

/home/nzm/toolchain/arm-2008q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libts-0.0.so.0, needed by /home/nzm/qt/qt-4.7.0-arm/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/home/nzm/qt/qt-4.7.0-arm/lib/libQtGui.so: undefined reference to `ts_read_raw'
/home/nzm/qt/qt-4.7.0-arm/lib/libQtGui.so: undefined reference to `ts_open'
/home/nzm/qt/qt-4.7.0-arm/lib/libQtGui.so: undefined reference to `ts_fd'
/home/nzm/qt/qt-4.7.0-arm/lib/libQtGui.so: undefined reference to `ts_config'
/home/nzm/qt/qt-4.7.0-arm/lib/libQtGui.so: undefined reference to `ts_close'
/home/nzm/qt/qt-4.7.0-arm/lib/libQtGui.so: undefined reference to `ts_read'
collect2: ld returned 1 exit status
make[3]: *** [blockingfortuneclient] 错误 1


把/usr/local/tslib/lib 下的相关库

libts-0.0.so.0  libts-0.0.so.0.1.0

拷到编译器库里面/home/nzm/toolchain/arm-2008q1/arm-none-linux-gnueabi/lib/


最后板上的环境变量设为:

export QWS_MOUSE_PROTO="tslib:/dev/input/event1 usb:/dev/input/event2"          


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值