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 : [EMAIL PROTECTED]    tel :(33)476514022
http://www-lsr.imag.fr/users/Michel.Levy


_______________________________________________
Users-prolog mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/users-prolog
  • Executable ronan987@ hotmail.com
    • Re: Executable michel levy

Reply via email to