天天看点

Qtopia-2.2.2在x86平台编译--错误修改总汇

qtopia-2.2.0编译错误修改

时间:2015.12.08

作者:大宝同学

QQ:2779916214

平台:fedora10

在使用天嵌公司提供的Qte源码在x86平台、arm平台编译通过之后,就想自己来从头移植Qte到arm平台,首先下载了qtopia-2.2.0的源码,这个东西真还不好找,后来在一个网友的csdn找到了,并且还不要积分的,良心网友,附上链接:http://download.csdn.net/detail/morre/1967261,在此感谢这位网友的无私分享!

直接解压:tar -zxvf qtopia-free-2.2.0.tar.gz

进入目录,首先进行配置

echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 320x240 -fontfamilies "helvetica fixed micro smallsmooth smoothtimes unifont"' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'

再接着编译:make

编译通过之后接着:make install

第一次编译会出现下面罗列的问题,可以按照错误提示一步一步修改,也可以先按照下面的步骤先修改源码,再编译。

编译通过之后使用下面的脚本运行(注下面的脚本来源于天嵌提供的运行脚本修改而来):

#!/bin/sh

qt_boot=/home/albert/qt_study/qte

$qt_boot/x86-qtopia-2.2.0/qt2/bin/qvfb -width 640 -height 480 -depth 16 &

cd $qt_boot/x86-qtopia-2.2.0/qtopia/image

if [ -d root ] ; then

echo "the root directory is already !"

else

mkdir root

fi

export set HOME=$PWD/root

cd opt/Qtopia

export set PATH=$PWD/bin:$PATH

export set LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH

export set QTDIR=$PWD

export set QPEDIR=$PWD

export set KDEDIR=$PWD/../kde

sleep 1

qpe

如果是先修改代码再编译运行的,可以直接运行成功,如果是按照错误提示一步一步修改, 运行时会提示错误无法找到:  /dev/fb0 这个时候直接进入x86-qtopia-2.2.0/qtopia/image/root/setting/文件夹 删除其中的qpe.conf文件再次运行即可。。。。。。

**********************************

  Qt2

**********************************1

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:214: 警告:此声明中的 ‘typedef’ 被忽略

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:230: 错误:‘QWSInputMethod’未声明

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:237: 错误:‘QWSGestureMethod’未声明

make[1]: *** [allmoc.o] 错误 1

make[1]: Leaving directory `/home/mantou/qt_study/qte/qtopia-free-2.2.0/qt2/src'

qtopia-free-2.2.0\qt2\src\kernel\qwindowsystem_qws.h 

56 行

class QWSGestureMethod;

class QWSInputMethod;

********************************2

qtopia-free-2.2.0\qt2\src\tools\qvaluestack.h

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qt2/include/qvaluestack.h:57: 错误:不能将‘int remove(const char*)’的实参‘1’从‘QValueListIterator’转换到‘const char*’

this->remove( this->fromLast() );

********************************3

\qtopia-free-2.2.0\qt2\tools\qvfb\ qvfbview.cpp

//在Fedora 10中调用的头文件中找不到asm/page.h文件,所以这里人工添加page.h中的PAGE_SIZE变量的定义。

//#include   39行

45行

#define PAGE_SHIFT         12

#define PAGE_SIZE  (1UL << PAGE_SHIFT)

#define PAGE_MASK        (~(PAGE_SIZE -1 ))

***********************************4

kernel/qpixmapcache.cpp:125:57: 错误:asm/page.h:没有那个文件或目录

kernel/qpixmapcache.cpp: In constructor ‘QSharedMemoryManager::QSharedMemoryManager()’:

kernel/qpixmapcache.cpp:539: 错误:‘PAGE_SIZE’在此作用域中尚未声明

kernel/qpixmapcache.cpp:539: 错误:‘PAGE_MASK’在此作用域中尚未声明

kernel/qpixmapcache.cpp: In member function ‘void QSharedMemoryManager::internal_free(QSMemPtr)’:

kernel/qpixmapcache.cpp:773: 错误:‘PAGE_SIZE’在此作用域中尚未声明

qtopia-free-2.2.0\qt2\src\kernel/qpixmapcache.cpp:773: 错误:‘PAGE_MASK’在此作用域中尚未声明

//# include // PAGE_SIZE,PAGE_MASK,PAGE_ALIGN

#define PAGE_SHIFT         12

#define PAGE_SIZE  (1UL << PAGE_SHIFT)

#define PAGE_MASK        (~(PAGE_SIZE -1 ))

********************************

qtopia

******************************5

`/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/libraries/qtopia'

qdawg.cpp:294: 错误:有多余的限定‘QDawgPrivate::’在成员‘QDawgPrivate’上

**********************************6

qtopia-free-2.2.0\qtopia\src\libraries\qtopia\backend

backend/event.cpp:419: 错误:ISO C++ 认为有歧义,尽管第一个备选的最差类型转换要好于第二个备选的最差类型转换

while ( !static_cast(( i & day ) && i) <= Event::SUN ) {

************************************7

thumbnailview_p.h:81: 错误:有多余的限定‘ThumbnailItem::’在成员‘paintItem’上

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/libraries/qtopia2'

***************************************8

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/libraries/qtopiapim

abtable_p.h:277: 错误:有多余的限定‘PhoneTypeSelector::’在成员‘addType’上

***************************************9

../../../include/qtopia/pim/private/../../../../src/libraries/qtopiapim/numberentry_p.h:106: 错误:有多余的限定‘NumberEntryDialog::’在成员‘eventFilter’上

****************************************10

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/libraries/mediaplayer

videoviewer.cpp:52: 错误:有多余的限定‘SimpleVideoWidget::’在成员‘SimpleVideoWidget’上

******************************11

qtopia-free-2.2.0\qtopia\src\applications\addressbook

ablabel.h:78: 错误:有多余的限定‘AbLabel::’在成员‘decodeHref’上

***************************12

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/games/minesweep

minefield.h:105: 错误:有多余的限定‘MineField::’在成员‘setState’上

minefield.h:106: 错误:有多余的限定‘MineField::’在成员‘placeMines’上

*******************************13

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/settings/buttoneditor

buttoneditordialog.h:56: 错误:有多余的限定‘ButtonEditorDialog::’在成员‘actionFor’上

**********************************14

qtopia-free-2.2.0\qtopia\src\settings\qipkg

packagewizard.h:106: 错误:有多余的限定‘PackageWizard::’在成员‘current’上

***************************************15

qtopia-free-2.2.0\qtopia\src\plugins\inputmethods\keyboard

keyboard.h:60: 错误:有多余的限定‘KeyboardPicks::’在成员‘KeyboardPicks’上

****************************************16

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/plugins/decorations/polished

polished.h:58: 错误:有多余的限定‘PolishedDecoration::’在成员‘drawBlend’上

*****************************************17

/home/mantou/qt_study/qte/qtopia-free-2.2.0/qtopia/src/server

inputmethods.cpp:86: 错误:有多余的限定‘IMToolButton::’在成员‘IMToolButton’上

继续阅读