QTE4.7编译安装详细步骤

虚拟机:redhat企业版5

交叉编译:arm-linux-gcc-4.5.1-v6

板子:tiny6410

qt-everywhere-opensource-src-4.7.0.tar.gz

 

参考mini6410 Qt4和Qtopia编程开发指南

                 

a安装QT4.7

①     拷贝压缩包到主机/opt目录下

②     #mkdir –p /opt/mini6410

③     #cd /opt/mini6410

④     #tar zxvf /opt/qt-everywhere-opensource-src-4.7.0.tar.gz

⑤     执行以下命令执行Qt4.7.0编译前的配置

⑥     #cd /opt/mini6410/qt-everywhere-opensource-src-4.7.0

#echo yes | ./configure -force-pkg-config -prefix /opt/Qt4.7 -opensource -embedded arm -xplatform qws/linux-arm-g++ -no-webkit -qt-libtiff -qt-libmng -qt-mouse-tslib -I/opt/tslib_over/include -L/opt/tslib_over/lib -qt-mouse-pc -no-mouse-linuxtp -no-neon(一定要注意,不能错一个空格,执行需要一段时间,如果瞬间通过则说明有误)

      注:1-force-pkg-config  是解决you have not explicitly asked to use pkg-config...错误的

         2-I/opt/tslib_over/include -L/opt/tslib_over/lib为了添加tslib路径

⑦      #make &&make install(执行完成后,查看/OPT下是否多出Qt4.7文件夹)

        时间相当的长

      注:若出现错误 /.../libQtGui.so:undefine reference to 'ts_read_raw'

                    /.../libQtGui.so:undefine reference to 'ts_open'

                    /.../libQtGui.so:undefine reference to 'ts_fd'

                    /.../libQtGui.so:undefine reference to 'ts_config'

                    /.../libQtGui.so:undefine reference to 'ts_close'

                    /.../libQtGui.so:undefine reference to 'ts_read'

                   collect2:Id return 1 exit stalus

                   make[3]:***[blocking foruneclient]错误1

       解决:将tslib_over/lib/libts-0.0.so.0和libts-0.0.so.0.1.1和libts.so复制到

             qt-everwhere-opensource-sr.../lib下就OK了

最后,在mini6410上部署Qt4.7

1.将虚拟机下的Qt4_over复制到板子的当初配置时的目录下

2.关闭板子上的其他qt 

                 方法:

QTE4.7编译安装详细步骤

 

 

3.需要编写脚本来配置QT

 在任意路径下新建脚本vi  /zjk/sh/setqt4env输入一下内容

#!/bin/sh
if test -e /etc/friendlyarm-ts-input.conf;then     #有test
   
 . /etc/friendlyarm-ts-input.conf     #此. /之间有一个空格
fi
true ${TSLIB_TSDEVICE:=/dev/touchscreen}
TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSDEVICE
export TSLIB_CONFFILE
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=:1
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin
if test -c /dev/touchscreen;then
 export QWS_MOUSE_PROTO="Tslib MouseMan:/dev/input/mice"
 if ! test -s /etc/pointercal;then
  rm /etc/pointercal
  /usr/bin/ts_calibrate
 fi
else
 export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
fi
export QWS_KEYBOARD=TTY:/dev/tty1
export HOME=/root

 

编译好文件见:http://download.csdn.net/detail/zhangjikuan/6513591

将脚本设置可执行权限  chmod +x /zjk/sh/setqt4env

运行脚本:/zjk/sh/setqt4env

cd /zjk/Qt4_over/demose/embedded/fluidlauncher

运行 ./fluidlauncher -qws

就可以了

注:以上是在要保证tslib正确的前提下

错误处祥看http://blog.sina.com.cn/s/blog_aece62d90101by88.html

http://blog.sina.com.cn/s/blog_aece62d90101bv8m.html

http://blog.sina.com.cn/s/blog_aece62d90101bv8r.html

http://blog.sina.com.cn/s/blog_aece62d90101bxcl.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值