This page contains code examples, tips, known bugs and work-arounds,
and similar information which may not be available in the regular
documentation. All code examples may be freely downloaded.
For information that do not apply to the latest version of SICStus
Prolog, please see the separate pages for earlier releases of SICStus Prolog.
Using SICStus Prolog from Microsoft Visual C++
Examples on building foreign resources and run-time systems under
Windows, with and without
examples use both C and C++. The same techniques can be used under
UNIX, for instance if you want to use the C compiler directly instead
Browse the source or
Download the source as a zip
How to Re-Enter License Information under Windows
The SICStus development system
spwin.exe) will prompt for license information if the
license entered during installation was invalid or has expired.
Note: You need to use
"Run as administrator" to start
spwin.exe if you intend
to enter or change the license information. Otherwise it will be saved
in a location where
sicstus.exe will not find it.
Managing Extended Runtime License Information
Read More >>>.
Starting SICStus in Emacs on Windows
The following steps creates a Windows shortcut that, when clicked,
starts SICStus Prolog in an Emacs with Unicode enabled.
- Install SICStus Prolog 4.5.1. The following steps assumes it
is installed in
C:\Program Files\SICStus Prolog 4.5.1\.
- Download and install the latest version of Emacs.
- Right click on your windows desktop. Select "New shortcut".
- In the shortcut creation wizard, under "Type the location of the
item", use the Browse button to navigate to the
....\bin\runemacs.exe file (where
.... depends on where you extracted/installed Emacs).
- Type a name for the shortcut, e.g. "Emacs SICStus". Press the
- Now right click on the "Emacs SICStus" shortcut that you created and left
click on "Properties" on the pop-up menu.
- In the "Target:" field change from
....\bin\runemacs.exe to the following, all as one line:
....\bin\runemacs.exe --load "C:\Program Files\SICStus Prolog 4.5.1\emacs\sicstus_emacs_init.el" --funcall run-prolog --name "Emacs SICStus"
- You may wish to change the "Start in:" field to some folder where
you store your Prolog files.
- Click the "Apply" button.
- Now double click the shortcut "Emacs SICStus" on your desktop. It
should start Emacs and automatically start SICStus Prolog within
- To verify that Unicode works, try the following at the SICStus top-level prompt:
atom_codes(A, [0x666E, 0x901A, 0x8BDD]).
It should say something like:
Install SICStus on Ubuntu 18 (GLIBC 2.27 and later)
The following only applies to SICStus Prolog 4.4.1 and earlier. It does not apply to SICStus 4.5.0 and later.
A change in recent versions of Linux makes the installer
InstallSICStus for SICStus 4.4.1 and earlier fail in the configure step, ending in:
Configuring system. This may take a few minutes...
Configuration phase failed. Output:
The logfiles shows something like
/usr/bin/x86_64-linux-gnu-ld: cannot find -lieee
To install SICStus 4.4.1 on Ubuntu 18, follow these steps:
- Install dependencies for doing a full install
sudo apt-get install gcc libc-dev tcl8.5-dev tk8.5-dev libdb-dev unixodbc-dev openjdk-11-jdk
Download the SICStus installer for glibc 2.17 (
using the web browser, or
Unpack the installer, and enter its folder:
tar xzf sp-4.4.1-x86_64-linux-glibc2.17.tar.gz
Then run the installer in the following way
sudo env enable_mieee_fp=no ./InstallSICStus
(This special way of invoking the installer is what solves the
cannot find -lieee issue.)
When the installer asks for the path to Java, enter
Specify JDK installation path, e.g., /usr/jdk1.5.0 (or leave blank) ? /usr/lib/jvm/java-11-openjdk-amd64
Known Bugs and Some Provisional Fixes