Compiling Python with Tkinter

Ben Ocean zope at thewebsons.com
Sun Dec 16 01:16:28 CET 2001


Hi;
I'm attempting to compile python2.1.1 with support for tkinter. The problem 
I'm running into is the fact that, apparently, my tkinter and tcl live in 
different directories. Therefore, following the instructions in 
Modules/Setup is a little confusing. Here's what I've done but it doesn't work:

# *** Always uncomment this (leave the leading underscore in!):
  _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
         -L/usr/lib \
### ***THIS NEXT LINE WAS MY IDEA***
         -L/opt/tcltk/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
         -I/usr/include \
### ***THIS NEXT LINE WAS MY IDEA***
         -I/opt/tcltk/include \
# *** Uncomment and edit to reflect where your X11 header files are:
         -I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
#       -I/usr/openwin/include \
# *** Uncomment and edit for Tix extension only:
#       -DWITH_TIX -ltix8.1.8.2 \
# *** Uncomment and edit for BLT extension only:
#       -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
#     (See http://www.pythonware.com/products/pil/ for more info)
         -DWITH_PIL -I../Extensions/Imaging/libImaging  tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
#       -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
         -ltk8.3 -ltcl8.3 \
# *** Uncomment and edit to reflect where your X11 libraries are:
         -L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
#       -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
#       -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
#       -lld \
# *** Always uncomment this; X11 libraries to link with:
         -lX11

Please tell me how to do this properly!
TIA,
BenO






More information about the Python-list mailing list