Check out the new USENIX Web site.
7th USENIX Tcl/Tk Conference
Home  | At a Glance  | Register  | Tutorials  | Technical Sessions  | Organizers  | Hotel & Travel  | Activities

T2am Embedding Tcl in C/C++ Applications  [Tutorials at a Glance]  [PDF format]
D. Richard Hipp, Hwaci

Who should attend: This tutorial is useful for anyone who wants to mix Tcl or Tcl/Tk with C or C++ in a single application. Participants should be familiar with C/C++ programming and have at least some experience in writing Tcl/Tk scripts.

These days, most people think of Tcl/Tk as a programming language, but Tcl was originally created as a C library, and it remains by far the best C library ever invented for building user interfaces.

This tutorial will describe how to use Tcl/Tk as a library instead of as a language.

Topics include:

  • A roadmap of the C API to Tcl/Tk
  • Procedures for creating, initializing, and controlling Tcl interpreters from within C/C++ programs
  • Ways to invoke Tcl procedures from C/C++ code and to invoke C/C++ procedures from within Tcl scripts
  • Tricks for embedding Tcl/Tk scripts in C/C++ programs as static strings
  • Guidelines for deciding when to use Tcl/Tk and when to use C/C++
  • Simple techniques for writing C/C++ programs that employ graphical user interfaces
  • Methods for using the Tcl/Tk library as a portability layer so that identical source code can be compiled to run on all flavors of UNIX and on Windows95/98/NT
  • Compilation procedures to turn Tcl/Tk scripts into standalone executables that are not readable by the end user and that run on machines which do not have Tcl/Tk installed

Since 1994, D. Richard Hipp has been writing C/C++ programs that embed Tcl/Tk. He has written numerous publicly available Tcl extensions, libraries, and programming tools, including Embedded Tk, MkTclApp, PtTcl, TkHtml, and Plot3D. He is one of the co-authors of Tcl/Tk Tools (O'Reilly & Associates). Richard has a Ph.D. in Computer Science from Duke University (1992) and is a founder of Hwaci, a software development consulting firm based in Charlotte, N.C.


?Need help? Use our Contacts page.
Last changed: 11 Nov. 1999 jr
Conference index
Events index
USENIX home