編譯Qt程式遇到ts_open、ts_fd 等未找到的解決方法
阿新 • • 發佈:2019-01-31
現象:出現類似下面的錯誤提示
/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtGui.so: undefined reference to `ts_read_raw'
/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtGui.so: undefined reference to `ts_open'/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtGui.so: undefined reference to `ts_fd'
/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtGui.so: undefined reference to `ts_config'
/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtGui.so: undefined reference to `ts_close'
/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib/libQtGui.so: undefined reference to `ts_read'
解決方法1:
在專案Makefile的LIBS中最後增加-lts
方法2:
將tslib的庫檔案放到qt的庫檔案目錄下面
我的系統是在:/usr/local/Trolltech/QtEmbedded-4.8.0-arm/lib