Compile Problem Imaging-1.0/Tk

Tilo Schwarz tilo.schwarz at daimlerchrysler.com
Mon Jan 31 10:45:07 EST 2000


Hi all,

(our newsserver was down some days and it seems to me that my first
posting didn't do through to comp.lang.python ... so I try it again.)

I successfully compiled the libImaging subdir of Imaging-1.0, but I
have a problem compiling the Tk subdir (I'm no tk expert). I followed
the install instructions, but I get the error:

> make                                                                          

[snip]

gcc -fpic  -IlibImaging -I/usr/local/include -I/usr/local/include
-DWITH_TKINTER -I/usr/X11R6/include -I/usr/local/include -O2 -m486
-fno-strength-reduce -I/usr/include/python1.5 -I/usr/include/python1.5
-DHAVE_CONFIG_H -c ./Tk/tkImaging.c
./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.


Now in tk8.0.h I found a "good" match:
EXTERN Tk_PhotoHandle   Tk_FindPhoto _ANSI_ARGS_((Tcl_Interp *interp,
                            char *imageName));
but if I include tk8.0.h, I get:

gcc -fpic  -IlibImaging -I/usr/local/include -I/usr/local/include
-DWITH_TKINTER -I/usr/X11R6/include -I/usr/local/include -O2 -m486
-fno-strength-reduce -I/usr/include/python1.5 -I/usr/include/python1.5
-DHAVE_CONFIG_H -c ./Tk/tkImaging.c
In file included from ./Tk/tkImaging.c:42:
/usr/X11R6/include/tk8.0.h:1275: parse error before `Tcl_Obj'
/usr/X11R6/include/tk8.0.h:1468: parse error before `Tcl_Obj'
/usr/X11R6/include/tk8.0.h:1495: parse error before `Tcl_Obj'
/usr/X11R6/include/tk8.0.h:1542: parse error before `Tcl_Obj'
/usr/X11R6/include/tk8.0.h:1551: parse error before `Tcl_Obj'
make: *** [tkImaging.o] Error
1                                                 


Any ideas?

Thanks for any help!


Bye
        Tilo

--------------------
Tilo Schwarz, DaimlerChrysler, Research Center Ulm, FT3/AB
Address:      Wilhelm-Runge-Str.11,  P.O. Box 23 60,  89013 Ulm, 
Germany
Phone:        +49 731 505 2376
Email:        tilo.schwarz at daimlerchrysler.com



More information about the Python-list mailing list