export QMAKE_CC=arm-none-linux-gnueabi-gcc
export QMAKE_CXX=arm-none-linux-gnueabi-g++
export QMAKE_LINK=arm-none-linux-gnueabi-g++
export QMAKE_LINK_SHLIB=arm-none-linux-gnueabi-g++
export QMAKE_AR=arm-none-linux-gnueabi-ar cqs
export QMAKE_OBJCOPY=arm-none-linux-gnueabi-objcopy
export QMAKE_STRIP=arm-none-linux-gnueabi-strip
http://www.voidcn.com/article/p-wbptwswe-qq.html
http://blog.csdn.net/hubin1989/article/details/7303503
tslib 编译
./autogen.sh
sudo apt-get install autoconf automake libtool
./configure --host=arm-linux --prefix=/home/smb/tslib ac_cv_func_malloc_0_nonnull=yes --enable-inputapi=no
./configure --prefix=/usr/local/tslib/ --host=arm-none-linux-gnueabi ac_cv_func_malloc_0_nonnull=yes --enable-inputapi=no
make
make install
tar xzvf qt-everywhere-opensource-src-4.7.3.tar.gz
cd qt-everywhere-opensource-src-4.7.3
./configure -opensource -confirm-license -release -shared -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -depths 4,8,16,18,24,32 -fast -optimized-qmake -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian -no-qt3support -no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2 -no-3dnow -no-openssl -no-webkit -no-qvfb -no-phonon -no-nis -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info -nomake examples -nomake tools -nomake docs -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib -D__ARM_ARCH_5TEJ__
make
lib/libQtGui.so: undefined reference to `ts_read_raw'
/lib/libQtGui.so: undefined reference to `ts_open'
/lib/libQtGui.so: undefined reference to `ts_fd'
/lib/libQtGui.so: undefined reference to `ts_config'
/lib/libQtGui.so: undefined reference to `ts_close'
/lib/libQtGui.so: undefined reference to `ts_read
解决办法:
'修改qt-everywhere-opensource-src-4.7.2/mkspecs/qws/linux-arm-g++/qmake.conf 文件(添加lts参数):
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
在编译应用程序的时候也要加上库 libts.a