theSq3Lite 10.0 NHI1 - theKernel - theLink - theConfig - theSq3Lite - theCompiler - theBrain - theGuard - theLib - theATL
c - tcl - atl - cs - py - rb - jv - cc
Loading...
Searching...
No Matches
Doc_sq3_tcl_Internal_Pkg_API
> TCL limitation

The permitted name of a TCL - C - extension follows the documentation for the load command:

> man load 

    If *prefix* is omitted or specified as an empty string, Tcl tries to guess the prefix. This may be done differently 
    on different platforms. The default guess, which is used on most UNIX platforms, is to take the last element 
    of *fileName*, strip off the first three characters if they are `lib`, and use any following alphabetic and underline 
    characters, converted to titlecase as the prefix. 

    For example, the command `load libxyz4.2.so` uses the prefix `Xyz` and the command `load bin/last.so {}` uses the 
    prefix **Last**.

The extension libtclsq3lite.so does not follow the TCL specification, which reads the 3 in the name as a version and not as part of the prefix so that only the prefix Tclsq is used:

OT_TCL_EXTERN int Tclsq_Init ( Tcl_Interp * interp )
#define OT_TCL_EXTERN
OT_TCL_EXTERN int Tclsq_Init(Tcl_Interp *interp)

The desired prefix is Tclsq3lite:

OT_TCL_EXTERN int Tclsq3lite_Init ( Tcl_Interp * interp )
OT_TCL_EXTERN int Tclsq3lite_Init(Tcl_Interp *interp)
initialize the Sq3Lite package

Both initialization functions are provided, although the second one with the correct name can only be selected via the prefix attribute of load:

load libtclsq3lite.so tclsq3lite