您的位置:首页 > 编程语言 > Qt开发

qtcreator cannot find -lts

2016-01-14 18:31 519 查看
/*********************************************************************
*                qtcreator  cannot find -lts
* 声明:
*     在对虚拟机文件夹整理的时候不小心将tslib的库目录给整理没了,然后
* 对Qt程序进行编译的时候发现找不到库文件,幸好保留了编译Qt库的配置脚本
* 文件,省了好多事。
*
*                                   2016-1-14 深圳 南山平山村 曾剑锋
********************************************************************/

一、错误现象:
/home/Qt/arm-linux-gcc/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find -lts
collect2: ld returned 1 exit status

二、原因:
编译Qt库的时候指定的tslib安装目录被移动了,找不到库的位置。

三、查看Qt库配置脚本如下:
#!/bin/sh
./configure \
-opensource \
-confirm-license \
-release \
-shared \
-embedded arm \
-force-pkg-config \
-xplatform qws/linux-arm-fsl-gnueabi-g++ \
-depths 16,18,24,32 \
-fast \
-optimized-qmake \
-pch \
-qt-sql-sqlite \
-qt-libjpeg \
-qt-zlib \
-qt-libpng \
-qt-freetype \
-little-endian -host-little-endian \
-no-qt3support \
-qt-libtiff -qt-libmng \
-make translations \
-qt-gfx-linuxfb -qt-gfx-transformed -qt-gfx-multiscreen \
-no-gfx-vnc -no-gfx-qvfb -qt-kbd-linuxinput \
-no-kbd-qvfb -armfpa  \
-no-mouse-qvfb \
-no-opengl \
-no-mmx -no-sse -no-sse2 \
-no-3dnow \
-no-openssl \
-webkit \
-no-qvfb \
-no-phonon \
-no-nis \
-no-opengl \
-no-cups \
-no-glib \
-no-xcursor -no-xfixes -no-xrandr -no-xrender \
-no-separate-debug-info \
-nomake examples -make tools -nomake docs \
-qt-mouse-tslib -DQT_QLOCALE_USES_FCVT \
-I/home/Qt/Qt/tslib-install/include \
-L/home/Qt/Qt/tslib-install/lib \
-importdir /usr/local/Trolltech/QtEmbedded-4.8.5-arm/qml

四、恢复库位置:
1. /home/Qt/Qt/tslib-install/include
2. /home/Qt/Qt/tslib-install/lib
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: