4
I have SWI-Prolog installed, but I’m using it as a kind of interpreter, Exp:
swi-pl?- [load].
True
I wonder if there is a simple command that I can use via terminal to compile the source code into a executable.
4
I have SWI-Prolog installed, but I’m using it as a kind of interpreter, Exp:
swi-pl?- [load].
True
I wonder if there is a simple command that I can use via terminal to compile the source code into a executable.
3
According to the SWI-Prolog.com:
For local use, you usually do not want to make an executable. Simply create a script as described in Prologscript, is easy and starts only a little slower in most cases.
A SWI-Prolog executable is a single file consisting of a native system executable, with the saved-state beside him. State is created usingqsave_program/2
, as described in the manual.
You can make create a .exe
using the qsave_program/2
or command line.
The command line below creates myapp.exe from load.pl and makes the program start from the main/0
:
plcon -o myapp.exe -c load.pl --goal=main
To run myapp.exe you need it to be in the same folder or on %PATH%
to libpl.dll
and any other dll called in the code.
Browser other questions tagged prolog
You are not signed in. Login or sign up in order to post.