Tk_InitStubs (3) Linux Manual Page
Tk_InitStubs – initialize the Tk stubs mechanism
Synopsis
#include <tk.h>
const char *
Tk_InitStubs(interp, version, exact)
Arguments
- Tcl_Interp *interp (in) Tcl interpreter handle.
- char *version (in) A version string consisting of one or more decimal numbers separated by dots.
- int exact (in) Non-zero means that only the particular Tk version specified by version is acceptable. Zero means that versions newer than version are also acceptable as long as they have the same major version number as version.
- char *version (in) A version string consisting of one or more decimal numbers separated by dots.
Introduction
The Tcl stubs mechanism defines a way to dynamically bind extensions to a particular Tcl implementation at run time. the stubs mechanism requires no changes to applications incoporating Tcl/Tk interpreters. Only developers creating C-based Tcl/Tk extensions need to take steps to use the stubs mechanism with their extensions. See the Tcl_InitStubs page for more information. Enabling the stubs mechanism for a Tcl/Tk extension requires the following steps:
- 1)
- Call Tcl_InitStubs in the extension before calling any other Tcl functions.
- 2)
- Call Tk_InitStubs if the extension before calling any other Tk functions.
- 2)
- Define the USE_TCL_STUBS symbol. Typically, you would include the -DUSE_TCL_STUBS flag when compiling the extension.
- 3)
- Link the extension with the Tcl and Tk stubs libraries instead of the standard Tcl and Tk libraries. On Unix platforms, the library names are libtclstub8.4.a and libtkstub8.4.a; on Windows platforms, the library names are tclstub84.lib and tkstub84.lib (adjust names with appropriate version number).
