Wanneer ik PHP 4.1.2 compile met GD 1.8.4 ( zonder GD ging het daarvoor feilloos ) krijg ik deze foutmelding:
Daarnaast helpt dit een eind op weg:
GD includes:
gd.h:
gd_io.h:
PHP stuff:
php_gd.h:
gd.c:
Zoals jullie zien worden gdImageColorResolve() en gdIOCtx dubbel en verschillend gedeclareerd.
Nu snap ik dat er hier iets moet gebeuren, dus wat zouden jullie doen, wat moet aan wat worden aangepast?
Subtiele hints of complete codefragmenten zijn welkom.
Nu heb ik gezocht op Google en is de enige oplossing die gegeven wordt deze:In file included from gd.c:36:
php_gd.h:69: warning: static declaration for `gdImageColorResolve' follows non-static
gd.c:92: conflicting types for `gdIOCtx'
/usr/local/gd/include/gd_io.h:18: previous declaration of `gdIOCtx'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/root/src/php-4.1.2/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/src/php-4.1.2/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/src/php-4.1.2/ext'
make: *** [all-recursive] Error 1
Beetje jammer dus.i've had the same problem since 4.0x...eventually i just gave up trying to
compile with gd support.If anyone has a better step by step instruction page
than the ones i've tried please let us know
bron: http://news.php.net/article.php?group=php.install&article=5706
Daarnaast helpt dit een eind op weg:
Effe de betrokken bestanden greppen op de genoemde functies en variabelen:Compiling PHP3 now gives the following warning (using gd 1.5):
functions/gdttf.c:165: warning: static declaration for `gdImageColorResolve' follows non-static
because the prototype in line 153 says
int gdImageColorResolve(...)
and the function declaration in line 163 says
static int gdImageColorResolve(...)
Another thought: Why is this function present in gdttf.c as well as in
gd.c? Isn't gd.c always used with gdttf.c?
bron: http://www.phpbuilder.com/mail/php-developer-list/199911/0798.php
GD includes:
gd.h:
code:
1
2
3
| [..] int gdImageColorResolve(gdImagePtr im, int r, int g, int b); [..] |
gd_io.h:
code:
1
2
3
4
5
6
7
8
9
10
11
| [..]
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);
int (*seek)(struct gdIOCtx*, const int);
long (*tell)(struct gdIOCtx*);
void (*free)(struct gdIOCtx*);
} gdIOCtx;
[..] |
PHP stuff:
php_gd.h:
code:
1
2
3
| [..] static int gdImageColorResolve(gdImagePtr, int, int, int); [..] |
gd.c:
code:
1
2
3
| [..] typedef FILE gdIOCtx; [..] |
Zoals jullie zien worden gdImageColorResolve() en gdIOCtx dubbel en verschillend gedeclareerd.
Nu snap ik dat er hier iets moet gebeuren, dus wat zouden jullie doen, wat moet aan wat worden aangepast?
Subtiele hints of complete codefragmenten zijn welkom.