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

M4pm Tcl Extension Building and SWIG  [Tutorials at a Glance]  [PDF format]
David M. Beazley, University of Chicago

Who should attend: Developers who are involved in building Tcl/Tk interfaces to C/C++ applications or building compiled extensions to Tcl 8.0 and need useful information as well as tools for automating the extension-building process. Participants should be familiar with C, but no prior experience with Tcl extension building is required.

We will explore several approaches to adding new commands and creating new shells in Tcl using C, including returning results and conversion functions. This tutorial will demonstrate the extensibility of Tcl and its strength as an embedded language.

Topics include:

  • Accessing Tcl variables
  • Mapping Tcl variables to C variables
  • Tracing Tcl variables
  • Executing Tcl commands from C
  • Embedding into an application
  • Creating new Tcl/Tk shells vs. dynamic loading of extensions
  • Action vs. object commands
  • An overview of TEA
The use of SWIG, a tool for automatically generating Tcl interfaces to C/C++ programs, will also be described. While the focus will be on SWIG, many of the topics also apply to other automated Tcl extension building tools.

SWIG-related topics include:

  • Building Tcl interfaces to C libraries
  • Working with objects and C++
  • Exception handling
  • Compilation and linking issues
  • Interface-building strategies, pitfalls, and tricks

Dave Beazley is the developer of SWIG, a freely available tool for building Tcl, Perl, and Python interfaces to C/C++ applications. He has worked at Los Alamos National Laboratory and has published a variety of articles on the use of scripting environments with high-performance scientific and engineering applications. He is an assistant professor at the University of Chicago in the Department of Computer Science.

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