Subject: Re: Creating a DLL, parameter problem

From: Jan Wielemaker <[email-masked]>
Date: Thu, 9 Nov 2000 15:05:07 +0100

> I want to create a DLL from a SWI-Prolog source file hello.pl
> As far as I understand your manual, the only way is to write a
> C-Wrapper that calls the intended prolog predicates.
> Below you will find such a wrapper.
> I assume, one has to call plld -share -o <dll-output> pl.c hello.pl
> for creating the dll or a share object under Linux.
> 
> If so, I like to know, how to adjust pl.c attached so that hello/2
> accepts a second argument.
> So far hello/2 gets only the first command line parameter in the case:
> 
>         plld -o test hello.pl pl.c
>         ...
>         test abc def

Actually, you cannot create a DLL from Prolog sources as it stands.  You
can embed the SWI-Prolog engine in an application or DLL and load a
Prolog program into the engine.  However, there is only one such engine
at a time in your process and this engine operates on one Prolog program
(or set of Prolog predicates if you want).

	Regards --- Jan