您好,欢迎访问一九零五行业门户网

php安装报错 ‘gdIOCtx’ 没有名为 ‘data’ 的成员

在安装php时,报如下错误 in file included from /kk/php-5.4.0/ext/gd/gd.c:103: /root/php-5.4.0/ext/gd/gd_ctx.c: in function ‘_php_image_stream_putc’: /root/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdioctx’ 没有名为 ‘data’ 的成员 /ro
在安装php时,报如下错误
in file included from /kk/php-5.4.0/ext/gd/gd.c:103:
/root/php-5.4.0/ext/gd/gd_ctx.c: in function ‘_php_image_stream_putc’:
/root/php-5.4.0/ext/gd/gd_ctx.c:51: 错误:‘struct gdioctx’ 没有名为 ‘data’ 的成员
/root/php-5.4.0/ext/gd/gd_ctx.c: in function ‘_php_image_stream_putbuf’:
/root/php-5.4.0/ext/gd/gd_ctx.c:58: 错误:‘struct gdioctx’ 没有名为 ‘data’ 的成员
/root/php-5.4.0/ext/gd/gd_ctx.c: in function ‘_php_image_stream_ctxfree’:
/root/php-5.4.0/ext/gd/gd_ctx.c:67: 错误:‘struct gdioctx’ 没有名为 ‘data’ 的成员
/root/php-5.4.0/ext/gd/gd_ctx.c:68: 错误:‘struct gdioctx’ 没有名为 ‘data’ 的成员
/root/php-5.4.0/ext/gd/gd_ctx.c:69: 错误:‘struct gdioctx’ 没有名为 ‘data’ 的成员
/root/php-5.4.0/ext/gd/gd_ctx.c: in function ‘_php_image_output_ctx’:
/root/php-5.4.0/ext/gd/gd_ctx.c:153: 错误:‘gdioctx’ 没有名为 ‘data’ 的成员
make: *** [ext/gd/gd.lo] 错误 1
解决方法
vi /include/gd_io.h
gdioctx结构中增加void *data;
格式如下
typedef struct gdioctx
{
  int (*getc) (struct gdioctx *);
  int (*getbuf) (struct gdioctx *, void *, int);
  void (*putc) (struct gdioctx *, int);
  int (*putbuf) (struct gdioctx *, const void *, int);
  /* seek must return 1 on success, 0 on failure. unlike fseek! */
  int (*seek) (struct gdioctx *, const int);
  long (*tell) (struct gdioctx *);
  void (*gd_free) (struct gdioctx *);
  void (*data);
}
gdioctx;
其它类似信息

推荐信息