您的位置:首页 > Web前端

在fedora15上编译pc版的qtopia2.2所遇到的问题

2014-06-15 13:50 316 查看
在fedora15下编译qtopia问题,遇到了很多问题,都无法解决,感觉很无赖。经过不断的google收集,这些问题得到了解决

首先要 vim build

cd qtopia-2.2.0-FriendlyARM

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

make

make install

cd ..

#/bin/rm qtopia-2.2.0-FriendlyARM/qtopia/image/opt/Qtopia/lib/fonts/helvetica_* 

mkdir  qtopia-2.2.0-FriendlyARM/qtopia/image

tar xfvz fonts.tar.gz -C qtopia-2.2.0-FriendlyARM/qtopia/image

  错误1:

    backend/vobject.cpp: In function ‘VObject* addGroup(VObject*, const char*)’:

     backend/vobject.cpp:419: error: invalid conversion from ‘const char*’ to ‘char*’

修改/x86-qtopia-2.2.0/qtopia-2.2.0-Friendly/qtopia/src/libraries/qtopia/backend/vobject.cpp:419行

        char *dot = strrchr(g,'.');

为    char *dot = (char*)strrchr(g,'.');

  错误2:

videocaptureview.cpp:54:28: 致命错误: linux/videodev.h:没有那个文件或目录

编译中断。

make[6]: *** [.obj/release-shared/videocaptureview.o] 错误 1

解决方法

yum install libv4l-devel

ln -s /usr/include/libv4l1-videodev.h   /usr/include/linux/videodev.h 

错误3:

../include/qvaluelist.h:88:13: error: ‘ptrdiff_t’ does not name a type

../include/qvaluelist.h:164:13: error: ‘ptrdiff_t’ does not name a type

In file included from ../include/qmap.h:46:0,

                 from kernel/qmime.h:43,

                 from kernel/qevent.h:45,

                 from kernel/qobject.h:45,

                 from kernel/qwidget.h:43,

                 from kernel/qdesktopwidget.h:40,

                 from kernel/qapplication.h:42,

                 from kernel/qapplication_x11.cpp:64:

../include/qvaluelist.h:424:13: error: ‘ptrdiff_t’ does not name a type

In file included from kernel/qmime.h:43:0,

                 from kernel/qevent.h:45,

                 from kernel/qobject.h:45,

                 from kernel/qwidget.h:43,

                 from kernel/qdesktopwidget.h:40,

                 from kernel/qapplication.h:42,

                 from kernel/qapplication_x11.cpp:64:

../include/qmap.h:107:13: error: ‘ptrdiff_t’ does not name a type

../include/qmap.h:223:13: error: ‘ptrdiff_t’ does not name a type

In file included from kernel/qmime.h:43:0,

                 from kernel/qevent.h:45,

                 from kernel/qobject.h:45,

                 from kernel/qwidget.h:43,

                 from kernel/qdesktopwidget.h:40,

                 from kernel/qapplication.h:42,

                 from kernel/qapplication_x11.cpp:64:

../include/qmap.h:604:13: error: ‘ptrdiff_t’ does not name a type

解决方法

在qtopia-2.2.0-FriendlyARM/dqt/include/qvaluelist.h文件下增加两个头文件:#include "stddef.h"和#include <cstddef>

错误4:

wavplugin.cpp: In member function ‘virtual bool WavPlugin::isFileSupported(const QString&)’:

wavplugin.cpp:435:45: error: invalid conversion from ‘const char*’ to ‘char*’

修改

    char *ext = strrchr( path.latin1(), '.' );



    char *ext = (char*)strrchr( path.latin1(), '.' );

错误5:

       /usr/bin/ld: .obj/release-shared/transferserver.o: undefined reference to symbol 'crypt@@GLIBC_2.0'

       /usr/bin/ld: note: 'crypt@@GLIBC_2.0' is defined in DSO /lib/libcrypt.so.1 so try adding it to the linker command line

       这个找了好久发现用了crypt函数 而没使用-lcrypt,   qtopia-2.2.0-FriendlyARM/qtopia/configure  1373行加入

       print CONFIG_PRI "LIBS+=-lcrypt\n";

错误6:

x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/bin/qpe: error while loading shared libraries: libqtopia2.so.2: cannot open shared object file: No such file or directory

解决方法:

cd x86-qtopia

mv  run qtopia-2.2.0-FriendlyARM/  下修改 run

vim run

qt2/bin/qvfb -width 480 -height 272 -depth 16 &

cd /qtopia/image

mkdir root 2>/dev/null || true

echo $PWD

export HOME=$PWD/root

#cd opt/Qtopia

#export PATH=$PWD/qtopia/bin:$PATH

export LD_LIBRARY_PATH=$PWD/qtopia/lib:$LD_LIBARAY_PATH

export QTDIR=$PWD/qt2

export QPEDIR=$PWD/qtopia

#export KDEDIR=$PWD/../kde

sleep 3

$PWD/qtopia/bin/qpe

再运行 run

错误7:

[root@localhome bin]# ./qpe

Cannot find font definition file /usr/lib/qt-3.3/lib/fonts/fontdir - is $QTDIR set correctly?

修改 /etc/profile

vim /etc/profile

QTDIR=x86-qtopia/qtopia-2.2.0-FriendlyARM/qt2

PATH=$PATH:$QTDIR/bin

QT_QWS_FONTDIR=$QTDIR/lib/fonts

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:x86-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/lib

export PATH  QTDIR  LD_LIBRARY_PATH QT_QWS_FONTDIR

然后

source /etc/profile
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息