Qt编译时出错为:warning: libts-1.0.so.0, needed by /myroot/qt/qtlib/lib/libQtGui.so, not found (try using
来源:互联网 发布:安装java运行环境 编辑:程序博客网 时间:2024/06/10 08:08
运行平台:ubuntu16.04 +Qt4.8
出错原因:用Qt4.8编译时qmake后,运行make出现错误,错误为:
usr/local/toolschain/4.4.3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.3/../../../../arm-none-linux-gnueabi/bin/ld: warning: libts-1.0.so.0, needed by /myroot/qt/qtlib/lib/libQtGui.so, not found (try using -rpath or -rpath-link)
/myroot/qt/qtlib/lib/libQtGui.so: undefined reference to `ts_read_raw'
/myroot/qt/qtlib/lib/libQtGui.so: undefined reference to `ts_open'
/myroot/qt/qtlib/lib/libQtGui.so: undefined reference to `ts_fd'
/myroot/qt/qtlib/lib/libQtGui.so: undefined reference to `ts_config'
/myroot/qt/qtlib/lib/libQtGui.so: undefined reference to `ts_close'
/myroot/qt/qtlib/lib/libQtGui.so: undefined reference to `ts_read'
collect2: ld returned 1 exit status
Makefile:120: recipe for target '机房监控之中控机' failed
make: *** [机房监控之中控机] Error 1
说明:我的qt安装在/myroot/qt/qtlab下
解决方法:
1.在里的项目目录下打开Makefile,在第十九行LIBS 最后添加-lts后保存退出。
2.之后运行make,(特别特别注意的是更改完makefile后不能运行qmake,应该运行make,运行qmake的意思是生成Makefile文件,你改完makefile后运行qmake就是重新生成makefile,之前的改变就被覆盖了,相当于我们什么也没做,我就因为一直改makefile一直qmake,陷入无线循环中,困扰了好久)
3.make后错误消失,成功编译。
4.谢谢阅读,希望可以帮你解决错误,对你有所帮助!
5.最后补充一下,上文所说的qmake是我的老师给的一个脚本,
多说几句吧!-------------------》我的qt4.8的解压到最后编译过程:
1.。压缩包:qt-everywhere-opensource-src-4.8.3.tar.gz
2.。解压:tar -xvf qt-everywhere-opensource-src-4.8.3.tar.gz
3.。执行脚本,脚本自己命名一个名字就行,权限给777就行,放于解压后的目录
4.。eg:我的,执行./qt_config.sh
5.。 然后执行make -j4
6.。执行make install
6.qt安装成功。
7.附录:为方便伙伴们的复制,脚本的代码如下:
./configure --prefix=/myroot/qt/qtlib -embedded arm -release -opensource -fast -no-accessibility -no -scripttools -no-mmx -no-multimedia -no-svg -no-webkit -no-3dnow -no-sse -no-sse2 -silent -qt-libpng -qt-libjpeg -no-libtiff -no-multimedia -make libs -nomake tools -nomake examples -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus -no-openssl -xplatform qws/linux-arm-gnueabi-g++ -little -endian -qt-freetype -depths 16,18,32 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen -no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput -no-glib -qt-mouse-tslib -I/myroot/qt/tslib/include -L/myroot/qt/tslib/lib
声明:有三个路径可以执行指定
111.。。。。。。。。。。。。--prefix=/myroot/qt/qtlib
222.。。。。。。。。。。。。-I/myroot/qt/tslib/include
333.。。。。。。。。。。。。-L/myroot/qt/tslib/lib
你也可以在想要安装的路径下建一个文件夹qt,在qt下建一个qtlib文件夹和一个tslib文件夹,在脚本指定就好
8.折腾了好久,最后要感谢老师的指导和帮助,自己亲身解决过一些问题真的是对以后处理问题是有所帮助的,遇到问题先冷静,慢慢思考。
0 0
- Qt编译时出错为:warning: libts-1.0.so.0, needed by /myroot/qt/qtlib/lib/libQtGui.so, not found (try using
- warning: libssl.so.1.0.0, needed by ……lib/libcurl.so, not found (try using -rpath or -rpath-link)
- 编译QT时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- libts-0.0.so.0 not found
- qt creator 编译报错 warning: libz.so.1, needed by 。。。
- [Makefile]warning: needed by not found (try using -rpath or -rpath-link)错误处理
- warning: needed by not found (try using -rpath or -rpath-link)错误处理
- 编译QT出现/usr/lib/libstdc++.so.6:version 'GLIBCXX_3.4.9' not found /usr/lib/libstdc++.so.6:version 'GLIBCXX_3.4.11'not found的解决
- /opt/qtsdk-2010.02/qt/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
- arm编译QT4.8.5时出现lib/libQtGui.so: undefined reference to `ts_read_raw'的解决办法
- /usr/bin/ld: warning: libswresample.so.1, needed by /usr/lib/gcc/i686-linux-gnu/4.9/../../../../lib/
- linux下编译QT出错:QMAKESPEC has not been set, so configuration cannot be deduced
- /lib/libQtGui.so: undefined reference to `ts_read_raw'
- C++11编译出现/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ./a.out)
- usr/lib/libstdc++.so.6 not found
- 解决/lib/libc.so.6: not found
- centos中lib*.so not found
- 百度地图lib/libgnustl_shared.so" not found
- SELECT INTO 和 INSERT INTO SELECT 两种表复制语句
- 自定义控件其实很简单 一
- android https正确调用方案(防中间人劫持)
- H5调用本地摄像头
- 我的第一篇博客
- Qt编译时出错为:warning: libts-1.0.so.0, needed by /myroot/qt/qtlib/lib/libQtGui.so, not found (try using
- Bootstrap下拉菜单
- android屏幕休眠和唤醒两种方法(newWakeLock)
- wampserver配置安装问题总结
- 简单认识TCP/IP协议
- 用IIS发布网站
- 中缀表达式转后缀表达式的实现
- 集群源码安装ONOS
- QTreeWidget树的三态操作