Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  How do I use Tk as a DLL with Tcl?
 A partial answer is:

On windows (depending on where you installed Tcl/Tk) do
 	`load c:/windows/system/tk80.dll Tk`
on AIX you have to extract the `shr.o` from inside the `libtk8.0.a` and
then you can load it with
 	`load ./shr.o Tk`

What you have to watch out for is that tclsh does not have an event loop
running so you have to provide your own. e.g.
 	`tkwait window .`
otherwise the shell will exit once it has evaluated the source.  When
compiling on Unix, make sure that -lX11 is specified to the linker,
otherwise the Tk library might have dynamic loading troubles.