主题 : tslib编译问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 72740
精华: 0
发帖: 17
金钱: 90 两
威望: 18 点
综合积分: 34 分
注册时间: 2012-06-27
最后登录: 2014-08-19
楼主  发表于: 2013-02-26 13:35

 tslib编译问题

郁闷死了

编译QT4.7
sudo ./configure -opensource -embedded arm -xplatform qws/linux-arm-g++  -no-webkit -qt-libtiff -qt-libmng  -qt-mouse-tslib -qt-mouse-pc -no-mouse-linuxtp -no-neon -I  /usr/local/tslib/include -L /usr/local/tslib/lib

出现这个错误
Creating qmake. Please wait...
make: 没有什么可以做的为 `first'。
The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
/home/ian/lib/qt-everywhere-opensource-src-4.7.0/mkspecs/qws/linux-arm-g++.

tslib我也已经编译安装了,实在是无解
#
# qmake configuration for building with arm-linux-g++
#

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

QMAKE_LIBDIR=/usr/local/tslib/lib
QMAKE_INCDIR=/usr/local/tslib/include

# modifications to g++.conf
QMAKE_CC                = arm-linux-gcc -lts
QMAKE_CXX               = arm-linux-g++ -lts
QMAKE_LINK              = arm-linux-g++ -lts
QMAKE_LINK_SHLIB        = arm-linux-g++ -lts

# modifications to linux.conf
QMAKE_AR                = arm-linux-ar cqs
QMAKE_OBJCOPY           = arm-linux-objcopy
QMAKE_STRIP             = arm-linux-strip

load(qt_config)

也添加了,

请问谁知道还遗漏了什么?







级别: 新手上路
UID: 72740
精华: 0
发帖: 17
金钱: 90 两
威望: 18 点
综合积分: 34 分
注册时间: 2012-06-27
最后登录: 2014-08-19
1楼  发表于: 2013-02-27 11:01
搞了3天,狂吐3斤鲜血,终于搞定了。太坑了。

打开configure后看脚本

    for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do
    if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
        "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS
            if [ $? != "0" ]; then
               echo "The tslib functionality test failed!"
               echo " You might need to modify the include and library search paths by editing"
               echo " QMAKE_INCDIR and QMAKE_LIBDIR in"
               echo " ${XQMAKESPEC}."
        exit 1

不光是着不到库会报这个错,着不到编译器,一样报这个错。
所以说

#
# qmake configuration for building with arm-linux-g++
#

QMAKE_INCDIR    +=/usr/local/include/
QMAKE_LIBDIR    +=/usr/local/lib/
QMAKE_LIBDIR     +=/usr/local/lib/ts

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

# modifications to g++.conf
QMAKE_CC                = /dev-lib/toolschain/4.5.1/bin/arm-linux-gcc -lts
QMAKE_CXX               = /dev-lib/toolschain/4.5.1/bin/arm-linux-g++ -lts
QMAKE_LINK              = /dev-lib/toolschain/4.5.1/bin/arm-linux-g++ -lts
QMAKE_LINK_SHLIB        = /dev-lib/toolschain/4.5.1/bin/arm-linux-g++ -lts

# modifications to linux.conf
QMAKE_AR                = arm-linux-ar cqs
QMAKE_OBJCOPY           = arm-linux-objcopy
QMAKE_STRIP             = arm-linux-strip

load(qt_config)

红色字是后来加上去的,再configure 就ok了

在编译tslib的时候要注意,千万别编译成了x86的,不然通不过test 一样又是报这个错。 尼玛,写清楚点会死啊