设为首页 加入收藏

TOP

Tiny6410 移植QT4.7.3(一)
2014-11-24 13:33:49 来源: 作者: 【 】 浏览:6
Tags:Tiny6410 移植 QT4.7.3

原来虽然移植过qt,但这次用友善之臂的tiny6410移植QT4.7.3还是费了一下午时间。


现在写点什么总结下。



【目标板】tiny6410


【编译器】arm-linux-gcc 4.3.2


【安装源】




(1) Qt_SDK_Lin32_offline_v1_1_2_en.run


http://qt.nokia.com/downloads/sdk-linux-x11-32bit-cpp-offline




(2) qt-everywhere-opensource-src-4.7.3.tar.gz


http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.tar.gz




(3) tslib1.4.tar.gz




(4) arm-linux-gcc 4.3.2




步骤:


(1)将qt-everywhere-opensource-src-4.7.3.tar.gz解压到指定目录




(2)终端cd进入qt-everywhere-opensource-src-4.7.3.tar.gz解压目录




(3)配置



# ./configure -prefix /opt/QtEmbedded-4.7.3 -release -shared -fast -pch -no-qt3support -qt-sql-sqlite -no-libtiff -no-libmng -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -no-openssl -nomake examples -nomake demos -nomake tools -optimized-qmake -no-phonon -no-nis -no-opengl -no-cups -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-xkb -no-sm -no-xinerama -no-xshape -no-separate-debug-info -xplatform qws/linux-arm-g++ -embedded arm -depths 16 -no-qvfb -qt-gfx-linuxfb -no-gfx-qvfb -no-kbd-qvfb -no-mouse-qvfb -confirm-license -qt-mouse-tslib -I/opt/tslib/include -L/opt/tslib/lib




备注:


最后3句是指定使用触摸屏,并制定tslib1.4的安装目录的头文件以及库函数。我的tslib是安装在opt下。


(4)make




(5)make install


至此arm版的qt4.7.3安装完毕,在arm板上跑qt的支持文件为/opt/QtEmbedded-4.7.3,将整个文件夹拷贝到arm板的文件系统的相应位置下即可。




注意:


开始我用的友善自带的工具链4.5.1,用上面的配置出现错:




shared/qimage_neon.o image/qimage_neon.cpp
image/qimage_neon.cpp: In function 'void qt_convert_rgb888_to_rgb32_neon(quint32*, const uchar*, int)':
image/qimage_neon.cpp:66: error: 'uint8x8_t' does not name a type
image/qimage_neon.cpp:82: error: 'fullVector' was not declared in this scope
make[1]: *** [.obj/release-shared/qimage_neon.o] Error 1
make[1]: Leaving directory `/home/hancy/qt_src/qt-everywhere-opensource-src-4.7.4/src/gui'
make: *** [sub-gui-make_default-ordered] Error 2






hmmm, you need add arm_neon.h to your qt sorce code, and modify the image/qimage_neon.cpp add #include "yourpath/arm_neon.h" under #ifdef QT_HAVE_NEON
you can find arm_neon.h from attached.



把arm_neon.h头文件也加入,接着出现错误:




shared/qimage_neon.o image/qimage_neon.cpp
In file included from image/qimage_neon.cpp:45:
image/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
image/qimage_neon.cpp: In function 'void qt_convert_rgb888_to_rgb32_neon(quint32*, const uchar*, int)':
image/qimage_neon.cpp:67: error: 'uint8x8_t' does not name a type
image/qimage_neon.cpp:83: error: 'fullVector' was not declared in this scope
make[1]: *** [.obj/release-shared/qimage_neon.o] Error 1
make[1]: Leaving directory `/home/hancy/qt_src/qt-everywhere-opensource-src-4.7.4/src/gui'
make: *** [sub-gui-make_default-ordered] Error 2






又查阅资料:




for here "image/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
"
you should add " -mfloat-abi=softfp -mfpu=neon" to your makefile CFLAG and CXXFLAG, the makefile is under `/home/hancy/qt_src/qt-everywhere-opensource-src-4.7.4/src/gui'
再次编译,发现上面所说的makefile是自动生成的,加入了 -mfloat-abi=softfp -mfpu=neon,依然出现错误
无奈去官网查了下,发现如下文章:
Error when building Qt for ARM

Hi,

I’m trying to build qt-everywhere-commercial-src-4.7.3 (with a commercial eva luation license) on Ubuntu 11.04 for an embedded linux system (ARM11). I’ve been roughly following this guide: http://developer.qt

首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇QT学习笔记:搭建Qt4.7.3嵌入式开.. 下一篇QT学习笔记: helloworld程序

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: