Compile Problem Imaging-1.0/Tk

Fredrik Lundh fredrik at pythonware.com
Tue Feb 1 08:20:11 EST 2000


Tilo Schwarz <tilo.schwarz at daimlerchrysler.com> wrote:
> ./Tk/tkImaging.c: In function `PyImagingPhoto':
> ./Tk/tkImaging.c:76: warning: passing arg 1 of `Tk_FindPhoto' from
> incompatible
> pointer type
> ./Tk/tkImaging.c:76: too many arguments to function `Tk_FindPhoto'
> make: *** [tkImaging.o] Error
> 1                                                 
> 
> I couldn't find something about that in an FAQ. 
> I have only one tk.h on my system (SUSE 6.2), which is in
> /usr/X11R6/include/tk.h and the libs seem to be alright: 
> /usr/X11R6/lib/libtk8.0.a
> /usr/X11R6/lib/libtk8.0.so       
> /usr/lib/libtcl8.0.a
> /usr/lib/libtcl8.0.so                                                                         
> 
> Now I have in Tk/tkImaging.c:76:
> 
>     photo = Tk_FindPhoto(interp, argv[1]);
> 
> and in tk.h:
> 
> EXTERN Tk_PhotoHandle   Tk_FindPhoto _ANSI_ARGS_((char *imageName));
> 
> which obviously doesn't match.

looks like an old header file.  iirc, they added the
interp argument at some time during the 8.0 beta phase,
so you might have an early 8.0 version on your machine.

unless you want to grab the latest and greatest Tcl/Tk
(8.0.5 is probably your best bet for Python 1.5.2), you
could try changing the call in tkImaging.c to match your
header file:

    photo = Tk_FindPhoto(argv[1]); /* using old Tk library */

</F>





More information about the Python-list mailing list