libts-0.0.so.0 not found

error when cross compile  qt-everywhere-opensource-src-4.6.2 and tslib-1.4

ld: warning: libts-0.0.so.0, needed by /home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so: undefined reference to `ts_read_raw'
/home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so: undefined reference to `ts_open'
/home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so: undefined reference to `ts_fd'
/home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so: undefined reference to `ts_config'
/home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so: undefined reference to `ts_close'
/home/zhxt/qt_for_arm/qt-everywhere-opensource-src-4.6.2/lib/libQtGui.so: undefined reference to `ts_read'
collect2: ld returned 1 exit status
make: *** [oventimer] Error 1

I find the website below form google:

After looking at the Makefile that's generated by qmake, 4.5.3 inserted "-lts" in the LIBS variable whereas this is missing on 4.6.2. If I just add this to the Makefile then it links ok.

This is user error. This is what happens:

QtGui links against tslib. Linking works as the linkerline adds -L/path/to/tslib from the configure line.

However, when an example links against QtGui the example should not directly link against tslib. However, it is a dependency to QtGui, so the linker gets unresolved symbols because it can not find tslib.

It is not recommended using the -L flag from command line when cross-compiling, but altering the mkspec.

To solve this either put tslib in the linkers lookup path or add a rpath-link line to your makespec as:
QMAKE_LFLAGS += -Wl,-rpath-link=/path/to/tslib/lib
or...
set the environment variable LD_LIBRARY_PATH to add a path to the linkers loopup path.

I test this:

To solve this either put tslib in the linkers lookup path or add a rpath-link line to your makespec as:
QMAKE_LFLAGS += -Wl,-rpath-link=/path/to/tslib/lib

it works ok;

from :

http://bugreports.qt.nokia.com/browse/QTBUG-7855?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

http://www.qtforum.org/article/31460/qt-everywhere-make-for-arm-fails-tslib-0-0-so-0-not-found.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值