#1 Linux compile problem

open
nobody
None
5
2008-02-12
2008-02-12
Anonymous
No

compiling ldglitesrc1_0_7.zip:

$ make -f makefile.linux
...
main.c: In function 'setBackgroundColor':
main.c:2229: error: incompatible implicit declaration of function 'translate_color'
main.c:1391: error: previous implicit declaration of 'translate_color' was here

code at main.c:1391:

void NewColorPrompt()
{
int i, c, x, y, w, h;
char str[] = " 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 19 25 Trans+32";
char *s;
ZCOLOR zc, zs;
int lineheight = 14.0;
int charwidth = 9.0;

extern void translate_color(int c, ZCOLOR *zcp, ZCOLOR *zcs);

Solution:

void NewColorPrompt()
{
int i, c, x, y, w, h;
char str[] = " 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 19 25 Trans+32";
char *s;
ZCOLOR zc, zs;
int lineheight = 14.0;
int charwidth = 9.0;

/* extern void translate_color(int c, ZCOLOR *zcp, ZCOLOR *zcs); */

Discussion


Log in to post a comment.