主题 : error: ‘ptrdiff_t’ does not name a type 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 30223
精华: 0
发帖: 31
金钱: 155 两
威望: 31 点
综合积分: 62 分
注册时间: 2010-10-13
最后登录: 2012-02-26
楼主  发表于: 2011-12-02 00:54

 error: ‘ptrdiff_t’ does not name a type

编译arm-qtopia-2.2.0时遇到:

../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
级别: 新手上路
UID: 30223
精华: 0
发帖: 31
金钱: 155 两
威望: 31 点
综合积分: 62 分
注册时间: 2010-10-13
最后登录: 2012-02-26
1楼  发表于: 2011-12-02 00:58
补充——
有警告:
***********************************
********* Build Qtopia ************
***********************************
QPE_CFG="'edition' 'pda' '-displaysize' '240x320' '-fontfamilies' 'helvetica fixed micro smallsmooth smoothtimes unifont' '-luuid' -no-qtopiadesktop -release -platform 'linux-g++-32' -xplatform 'linux-arm-g++'"

The following configuration values have been guessed or autodetected:
    -arch arm
    -edition pda
    -fontsizes all
    -fontstyles 50 50i 75 75i
    -languages en_US

WARNING: defaultbuttons-arm.conf does not exist.
Symlinking header files to include directory
Creating qmake...No makedepend available
make[1]: Entering directory `/home/mini6410/friendlyArm/mini6410/linux/arm-qtopia/qtopia-2.2.0-FriendlyARM/qtopia/qmake'
.
级别: 新手上路
UID: 5022
精华: 0
发帖: 37
金钱: 185 两
威望: 37 点
综合积分: 74 分
注册时间: 2009-04-08
最后登录: 2013-03-09
2楼  发表于: 2011-12-12 15:24
我也一样 网上说是 与gcc 的关系吧
级别: 新手上路
UID: 62385
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
综合积分: 2 分
注册时间: 2012-01-28
最后登录: 2012-01-30
3楼  发表于: 2012-01-30 22:25
我也遇到了··该这么解决····麻烦高手解答···
级别: 新手上路
UID: 65364
精华: 0
发帖: 1
金钱: 5 两
威望: 1 点
综合积分: 2 分
注册时间: 2012-03-17
最后登录: 2012-07-20
4楼  发表于: 2012-03-17 15:32
qvaluelist 少个头文件 加上就行了
级别: 侠客
UID: 55184
精华: 1
发帖: 76
金钱: 430 两
威望: 86 点
综合积分: 172 分
注册时间: 2011-09-13
最后登录: 2015-10-01
5楼  发表于: 2013-10-16 21:21
/dqt/include/qvaluelist.h文件下增加两个头文件:#include “stddef.h”和#include <cstddef>