分类: LINUX
2014-02-21 15:39:34
开发环境
ubuntu12.04
arm-linux-gcc4.4.1
前面几个错误,飞凌视频中已提过没有写
eg:1、/opt/QT/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:214: warning: ‘typedef’ was ignored in this declaration
/opt/QT/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:230: error: ‘QWSInputMethod’ has not been declared
/opt/QT/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:237: error: ‘QWSGestureMethod’ has not been declared
$ vim qt2/include/qwindowsystem_qws.h
在前面增加以下两行(57,58)
class QWSInputMethod;
class QWSGestureMethod;
1、‘ptrdiff_t’ 不是一个类型名
改:添加#include
2、Creating pngscale...make[1]: Entering directory `/opt/QT/yizhi/qtopia-free-2.2.0/qtopia/util/pngscale'
..make[1]: *** [../../bin/pngscale] Error 1
make[1]: Leaving directory `/opt/QT/yizhi/qtopia-free-2.2.0/qtopia/util/pngscale'
Failed to make pngscale
分析:
这是因为没有安装uuid和Xmu,因为在编译qtopia2.2.0的过程中需要安装工具uuid(Universally Unique Identifier,)和 xmu库文件。
解决办法:
apt-get install uuid-dev
apt-get install libxmu-dev libxmu6
3、qdawg.cpp:294: error: extra qualification ‘QDawgPrivate::’ on member ‘QDawgPrivate’
$ vim qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg.cpp
将
QDawgPrivate::~QDawgPrivate()
{
delete memoryFile;
}
修改为:
~QDawgPrivate() // delete "QDawgPrivate::~" 2010-12-10
{
delete memoryFile;
}
4、error:backend/vobject.cpp: In function ‘VObject* addGroup(VObject*, const char*)’:
backend/vobject.cpp:419: error: invalid conversion from ‘const char*’ to ‘char*’
改:/qtopia-free-2.2.0/qtopia/src/libraries/qtopia/backend/vobject.cpp:419行
char *dot = strrchr(g,'.');
为 char *dot = (char*)strrchr(g,'.')
5、(这是一大类错误,在编译过程中会遇到很多):g++编译器提示 有多余的符号在成员函数前 ,有些编译器规定C++成员函数前不需要再加这个类的名字
thumbnailview_p.h: At global scope:
thumbnailview_p.h:81: error: extra qualification ‘ThumbnailItem::’ on member ‘paintItem’
make[5]: *** [.obj/release-shared/imageselector.o] Eopia/src
解决办法 :
qtopia-free-2.2.0/qtopia/src/libraries/qtopia2/thumbnailview_p.h文件中第81行:
修改 void ThumbnailItem::paintItem( QPainter*, const QColorGroup& );
修改后 void paintItem( QPainter*, const QColorGroup& );