# Comment the next line out if you don't want to define module "tkinter".
TCL_DIR = path/to/the/directory/where/tcl/and/tk/live
tkinter tkintermodule.o -I$(TCL_DIR)/include -I$(TCL_DIR)/tk3.6 -L$(TCL_DIR)/lib -ltk -ltcl -lX11
and voila, (as long as Tkinter.py is somewhere in your sys.path) you
are done! This is how I do it and it seems much simpler to me than
the whole messy Extensions mechanism. Hope this helps,
Guido Sohne writes:
| In article <199408151701.TAA09963@inf.enst.fr>,
| Samuel Tardieu <tardieu@inf.enst.fr> wrote:
| >Guido Sohne wrote:
| >
| > I have been trying to create the tkinter version of Python without any
| > success. I have succesfully built a standard and stdwin version of Python
| > with few problems. These are the symptoms I'm coming across.
| >
| > After gcc -tradional compiles the source for tkinter version of python,
| > I get a series of errors saying that libx.a (x is Python, Parser etc) is
| > out of date and re-run ranlib.
| >
| > Then I get a series of errors referring to undefined symbols eg __main
| > _newparser,_delparser among others.
| >
| >Eh boy, I've got an idea: run ranlib :)
| >Seriously, do a: ranlib /u/wgsohne/lib/pythoon/lib/libParser.a
| >(or whatever library ld complains on)
| >Then type 'make' again.
| >
|
| Nope. ranlib run on each of the libraries being complained about has no
| effect whatsoever on the problem. Guido said I should look into the way the
| libraries are being ordered and it changed the symbols that were being
| complained about. I think it might help me to know exactly how extensions
| are integrated with the main package, link wise not source wise :-)
|
| I have only had the package for a few hours but I think the vanilla
| intepreter is encapsulated in libModule.a libObject.a libParser.a
| libPython.a in addition to a few other libraries like readline etc. To add
| an extension, does one simply link in the extension.o file and the lib.a
| generating in the compilation of the extension ? If so I could hack the
| main python generation to just include those libraries in its link step.
|
| On a general note, I just can't understand how ld could not resolve all the
| symbols if all the libraries needed are present. Thats its whole purpose. I
| still think I'm missing something basic. Or not. If the install script
| seems to work for everyone else but not for me it must be my fault :-)
|
| --
| Guido
| > Sam
| >--
| >"La cervelle des petits enfants, ca doit avoir comme un petit gout de noisette"
| > Charles Baudelaire
|
|
-------> Tommy.
"I am who I am who I am. Well, who am I?" -- Dave Matthews