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 pre-installed or available via some software update utility. If a default version is not available, Tcl/Tk can be downloaded from the Tcl/Tk primary website:
http://tcl.sourceforge.net
A better alternative may be to use one of the free installers available from:
http://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 you
can try to update to a newer version of Tcl/Tk from
http://www.activestate.com.
The Tcl/Tk interface module included in
SICStus Prolog 4.3.0
(library(tcltk)
) is verified to work with Tcl/Tk 8.4, and with
Tcl/Tk 8.5 for some platforms. See the SICStus download web page,
http://sicstus.sics.se/download4.html, 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.