item2
Next»

contents

 

Introduction - 1

History - 2

Overview - 3

Advanced features - 4

Work in progress - 5

One possibility - 6

Conclusion - 7

 

References

Appendix 1 - blowfish

Appendix 2 - tkspline

3 - Critcl Overview

As mentioned, Critcl allows C code to be embedded in Tcl scripts, (transparently) compiled and called like any Tcl procedure.

It provides procedures for:

  • defining C functions that are callable as Tcl procedures
  • specifying header files and C command line parameters
  • injecting C code into the intermediate C program
  • checking if Critcl is available on the current platform
  • forcing a compile and checking whether it was successful

All generated code and the MD5 checksums are collected in a per-user/per-platform directory (~/.critcl/platform) - which can be safely located on a shared volume.

Critcl is self-contained:

  • there are copies of all required Tcl and Tk header files inside Critcl, so there is no need for a developer Tcl/Tk installation
  • there is no need for pre-compiled Tcl/Tk stub libraries to link against, since Critcl has its own stub glue included

For convenience, Critcl is packaged as a Starkit - a single file packaging of Tcl code and data - which can be downloaded from the Starkit Distribution Archive [6] .

The following examples will demonstrate the use of Critcl in a number of situations.

3.1 - Extending Tcl Scripts with C code

3.2 - Building Libraries

3.3 - Building Packages

3.4 - A More Complex Package

3.5 - A Tk Package

see also

Critcl Home Page

Tclkit Home Page

Starkit Home Page

Wikit Home Page

Tclers' Wiki

Steve's Website

Jean-Claude's Website

Paper by S. Landers & J.C. Wippler, as presented at Tcl/Tk 2002 conference - see also original PDF.

Papers & Presentations