users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Executable


From: michel levy
Subject: Re: Executable
Date: Tue, 04 Sep 2007 11:50:05 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

ronan987@ hotmail.com a écrit :
Hi. I read on GNU Prolog’s website (http://www.gprolog.org) that the simplest way to obtain an executable from a Prolog source file prog.pl is to use:

$ gplc prog.pl

This will produce an native executable called prog which can be executed as follows:

$ prog

I did that on Linux, but after I typed in prog, nothing happened, I just got the system prompt. I was wondering what I need to do to fix that. Also, I’m using GNU Prolog on Windows XP and I’d like to produce an executable Prolog file, how would I do that?


It would be interesting to know your prog.pl

Have you a directive
:- initialization(Goal).
where Goal is the first callable_term to be executed ?
Look at the doc
http://www.gprolog.org/manual/html_node/gprolog021.html#toc38
for more information

Example :
:- initialization(creation).
creation :- randomize,sudoku_contraintes(G), tirage(0,G).


--
Michel Levy
L.S.R., Bureau C214, B.P.72 - 38402 SAINT MARTIN D'HERES CEDEX
e.mail : address@hidden    tel :(33)476514022
http://www-lsr.imag.fr/users/Michel.Levy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]