7 Tcl/Tk Notes

library(tcltk) is built on top of Tcl/Tk. It is an optional component of SICStus and you can safely ignore this section if you do not intend to use library(tcltk).

Tcl/Tk itself is not included in the SICStus distribution. It must be installed in order to use the interface. Many operating systems have build-in support for Tcl/Tk, either preinstalled or available via some software update utility. If a default version is not available, then Tcl/Tk can be downloaded from the Tcl/Tk primary website:

https://www.tcl.tk/

A better alternative may be to use one of the free installers available from:

https://www.activestate.com

SICStus for Mac OS X uses the Tcl/Tk that comes with Mac OS X. Some versions of Tcl/Tk provided by Apple have bugs that may cause SICStus Prolog to crash when using library(tcltk). If this happens, then you can try to update to a newer version of Tcl/Tk, e.g. by using the installers from https://www.activestate.com/.

library(tcltk) is built using a particular version of Tcl/Tk but it is possible to recompile it, if needed, to work with other versions as well. The version differs between platform, see https://sicstus.sics.se/ for details.

Under UNIX, the installation program automatically detects the Tcl/Tk version (if the user does not specify it explicitly).

Please note: On Windows, you need to have the Tcl/Tk binaries accessible from your PATH environment variable, e.g. C:\Program Files\Tcl\bin.

The GUI version of SICStus, spwin, like all Windows non-console applications, lacks the C standard streams (stdin, stdout, stderr) and the Tcl command puts and others that use these streams will therefore give errors. The solution is to use sicstus instead of spwin if the standard streams are required.



Send feedback on this subject.