GrabDuck

编译QT-Arm版本的的一些问题-qq327926614

:

我在编译arm版本的qt时候,使用的是海思交叉编译器:arm-hisiv200-linux,qt-everywhere-opensource-4.8.6的。其他都是按照别人的方法在装的(参照:http://www.xuebuyuan.com/763156.html)开始的时候我把我解压在/usr/local/qt-4.8.6-arm/mkspecs/qws/linux-arm-g++/qmake.conf文件里的:

 QMAKE_CC                         = arm-hisiv200-linux-gcc
QMAKE_CXX                      = arm--hisiv200-linux-g++
QMAKE_LINK                      = arm--hisiv200-linux-g++
QMAKE_LINK_SHLIB        = arm--hisiv200-linux-g++ 
QMAKE_AR                   = arm--hisiv200-linux-ar cqs
QMAKE_OBJCOPY      = arm--hisiv200-linux-objcopy
QMAKE_STRIP             = arm--hisiv200-linux-strip

编译的时候sudo ./configure -prefix /usr/local/qt-4.8.6-arm -embedded arm -little-endian -no-cups -no-3dnow -no-accessibility -no-script -no-scripttools -no-qt3support -no-sql-sqlite -no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci -no-sql-odbc -no-sql-psql -no-sql-symsql -no-sql-tds -no-xmlpatterns -no-mmx -no-multimedia -no-sse -no-sse2 -no-svg -no-webkit -no-neon -no-glib -nomake examples -nomake demos -nomake tools -xplatform /qws/linux-arm-g++ -qt-mouse-tslib -I/usr/local/tslib/linclude -L/usr/local/tslib/lib

报错:第一个错误:You have not explicitly asked to use pkg-config and are cross-compiling. pkg-config will not be used to automatically ...

第二个错误:还有就是说我的tslib找不到:The tslib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR and QMAKE_LIBDIR in。我花了有两天时间,找不到原因。最后原因还是在/usr/local/qt-4.8.6-arm/mkspecs/qws/linux-arm-g++/qmake.conf文件里的,我添加了一些东西,并改了全路径:

QMAKE_INCDIR                =/usr/local/tslib/include

QMAKE_LIBDIR                 =/usr/local/tslib/lib

 QMAKE_CC                         =/opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm-hisiv200-linux-gcc
QMAKE_CXX                      = /opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm--hisiv200-linux-g++

   QMAKE_LINK                      =/opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm--hisiv200-linux-g++

   QMAKE_LINK_SHLIB        = /opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm--hisiv200-linux-g++

   
QMAKE_AR                   = /opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm--hisiv200-linux-ar cqs

   QMAKE_OBJCOPY      = /opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm--hisiv200-linux-objcopy

   QMAKE_STRIP             = /opt/hisi-linux/x86-arm/arm-hisiv200-linux/target/bin/arm--hisiv200-linux-strip

最后编译成功。读者注意报错相同,但是出的错误问题可能不一样,仅供参考!!!!