3.3. Linking libpgtcl Into an Application

You can link the libpgtcl library into an application. The application might be a version of the standard Tcl shells tclsh or wish, or it can be a complete application with more custom packages and commands.

The pgtcl-ng distribution includes the source code to custom versions of the Tcl shells tclsh and wish in the extra/ directory. They are called pgtclsh and pgwish. (Note pgwish used to be called pgtksh). These are the same as the standard Tcl shells, but with pgtcl pre-loaded. See the documentation in the extra/ directory for instructions on building and using these shells. Building and using these have only been tested on Unix-like systems, not on Windows systems.

Use of these shells is not the recommended method for using pgtcl. With the large number of extensions available for Tcl/Tk, it rarely makes sense to build a new shell with one extension. It is much better to arrange to dynamically load extensions as needed into the standard tclsh (or wish) shells.

The contents of the extra/ directory can also be used as a reference if you want to build a custom executable for your own application with pgtcl built-in. But you should consider dynamic loading instead.

SourceForge.net Logo

This version of the manual was produced for the Pgtcl-ng Sourceforge project web service site, which requires the logo on each page.

To download a logo-free copy of the manual, see the Pgtcl-ng project downloads area.