qtcreator cannot find -lts


/*********************************************************************
 *                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 
        

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM