autoexec.bat
from which to run qpvars.bat to set up environment
variables. Instead you can use the System control panel
to set up these environment variables.
The following assumes Quintus is installed in the default location
C:/quintus.
"Quintus" to "C:\quintus" (without the
quotes), prepend "C:\quintus\include;" to the
environment variable "Include", prepend
"C:\quintus\lib\ix86;" to the environment variable
"Lib" and prepend "C:\quintus\bin\ix86" to
the environment variable "Path". If
"Include" or "Lib" does not previously exist
then they should be set as above but without the semicolon.
"QUINTUS_PROLOG_PATH" to
"C:/quintus/bin/ix86/prolog.exe" to ensure the Emacs
interface works correctly. (This is not set from
qpvars.bat but probably should be). TMPDIR environment variable that does not contain
backslash characters. TMPDIR should be the path to a directory where
Quintus can write temporary files. It is also recommended that this is
a short file name, that is, a file name that does not contain space
characters.
On Windows 2000 you can give the command SET TEMP to obtain a suitable
directory. Note that you need to change any backward slashes
\to forward slashes /. A typical value for a
user "joe" could be C:/DOCUME~1/joe/LOCALS~1/Temp.
When Quintus is run outside of Emacs and there is no
TMPDIR Quintus will use C:/temp as a
fallback, which may not exist. This affects the manual/1
predicate among other things. For this reason it is recommended that
TMPDIR is set up as above even if Quintus is only used outside of
Emacs.
windows/emacs/latest/ on any FSF mirror, see section
"Where can I get precompiled versions?" in http://www.gnu.org/software/emacs/windows/ntemacs.html
for details. An installer for XEmacs can be obtained from www.xemacs.org.
manual/1 may not work correctly unless
TMPDIR is setup as described above.
prolog.exe) from a command prompt. This is not a problem if
running qpwin.exe or if running Quintus from within
Emacs. The reason is that the command interpreter
(cmd.exe) uses a different code page than the system
default. A symptom of this is that a character entered at the Quintus
top-level gets a different numerical code than the same character read
from a file. There is no work around at this time; the command
chcp (change codepage) does not seem to have the desired
effect. This is a Windows problem, not a Quintus bug.
There are some problems on Windows when running Quintus (prolog.exe) from within Emacs.
The following assumes you start Quintus from withing Emacs using
M-x run-prolog or equivalent.
manual/1 predicate will fail if called from
within Emacs unless TMPDIR is set as above. E.g., when
doing manual(d). Emacs will report that there is no
information available. (Emacs will ensure that TMPDIR is
set and exists but it may contain backward slashes).
C-c C-c) does
not always work reliably. The situation seems to have improved in
later version of Emacs, e.g., Emacs 20.7.1.
At least in Emacs 20.7, it is possible to interrupt a running Quintus
using C-c C-c (i.e., interrupt-prolog). This
does not work in some earlier versions of Emacs (and also not in
XEmacs 21.4, which also has other problems with Quintus emacs code).
An attempt to interrupt Quintus while it is waiting for character input (either at a top-level prompt or as result of calling, e.g., read/1) will not interrupt Quintus. Furthermore, subsequent attempts to interrupt Quintus (even when not waiting for character input) will have no effect. After restarting prolog it will be interruptible again.
When building a self contained executable with qld -S you
may need to pass some Windows libraries to the linker to
avoid "unresolved external symbol" errors. Something
like:
qld -S -d -o foo.exe foo.qof -LD user32.lib gdi32.lib comdlg32.lib
Some tips for including prolog code in a Microsoft Visual Studio
project. You can browse the files
QPExampleProject
or download the zip archive
qpexampleproject.zip.