From lains@caramail.com  Wed Aug  9 14:04:33 2000
Received: from mail.caramail.com (mail.caramail.com [195.68.99.70])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id OAA15366;
	Wed, 9 Aug 2000 14:04:27 +0200 (MET DST)
Received: from caramail.com (www28.caramail.com [195.68.99.48])
	by mail.caramail.com (8.8.8/8.8.8) with SMTP id OAA29780;
	Wed, 9 Aug 2000 14:11:18 +0100 (WET DST)
Date: Wed, 9 Aug 2000 14:11:18 +0100 (WET DST)
Posted-Date: Wed, 9 Aug 2000 14:11:18 +0100 (WET DST)
From: Lionel Ains <lains@caramail.com>
To: Jan Wielemaker <jan@swi.psy.uva.nl>, prolog@swi.psy.uva.nl
Message-ID: <965826329000449@caramail.com>
X-Mailer: Caramail - www.caramail.com
Mime-Version: 1.0
Subject: Re: DLL loading problem with plcon
Content-Type: multipart/mixed; boundary="=_NextPart_Caramail_000449965826329_ID"

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

--=_NextPart_Caramail_000449965826329_ID
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

> -------Message d'origine-------
> De : Jan Wielemaker <jan@swi.psy.uva.nl>
> Date : 09/08/100 13:09:17
> 
> On Tue, 08 Aug 2000, Lionel Ains wrote:
> >
> >OK, here is the command-line:
> >
> > "C:\Program Files\SWI-Prolog\bin\plcon" -g "load_files(['prog']), write_ln('Program
> >loaded'), qsave_program('prog.exe', [goal=3Dgo, toplevel=3Dnone, stand_alone=3Dtrue]), 
write_ln('Program
> >Successfully saved')" -t halt.
> 
> Well, it is a bit complicated. First of all, toplevel=3Dnone isn't a
> good idea. It will make Prolog call none/0 as toplevel. If you don't
> want a toplevel use halt/0.
> 
> Generally a better idea is to do
> 
> go :-
> 	
> 	halt.
> 
> and don't change the toplevel. That way you can use Control-C and
> break for (some) debugging. If you don't want the user doing this,
> toplevel=3Dhalt is indeed a way to prevent it.
> 
> To create executables, just do
> 
> 	plcon -g go -o myprog -c prog.pl
> 
> which will create myprog(.exe on Windows).
> 
> 	Regards --- Jan
You're perfectly right, it's quite complicated but I've switched back to this command line compilation 
after having problems with plcon.exe. I was using the "plcon -o" command line as well before having 
problems with DLL loading.
In fact, I've realised that plcon was not crashing but simply not outputting messages anymore.
After loading the foreign language library, no prompt, nor even compilation message is printed 
anymore. Prolog is still running but all its output is muted.
However, I can get all the messages when I redirect the output to a file on plcon's command-line.
This must be the reason why I don't have any problem with plwin.exe because I guess that the output 
to the Window is handled a different way.
Would there be a few Prolog environment variables that I could check to be sure that the output is set 
correctly?

> P.s.	Is the problem loading your dll into the interactive plcon
> 	resolved. It should not make any difference. So if the
> 	problem remains, please send me the stuff needed to reproduce
> 	it.
If you want, I can send the DLL file directly to you, and the C source code for the Prolog foreign 
language interface as well.

> P.s.s.	If you think your interface is useful for others, please
> 	consider providing it as a SWI-Prolog package.
If I can manage to fix all the problems and clean the code, I will send you the code for this interface. I 
have to check the license with the owners of the Grammar Language Parser to see if I can do so.
A new release of the Link Grammar Parser has be finished (v4.0). This allow users to parse the 
grammar links contained by a sentence in English. For more information, have a look at 
http://bobo.link.cs.cmu.edu/index.html/ .
This parser is quite powerful and efficient, and the interface I'm currently developping allows Prolog to 
parse any sentence by using the Link Grammar Parser library. The grammar link structure is then 
returned as a Prolog term containing the link structure.
I will let you know about the progress of this work.

Lionel
______________________________________________________
Bo=EEte aux lettres - Caramail - http://www.caramail.com


--=_NextPart_Caramail_000449965826329_ID--

