linux qt 4.7,qt 4.7.3

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值