From jan@swi.psy.uva.nl Wed Sep 26 16:40:36 2001
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f8QEeav29878;
	Wed, 26 Sep 2001 16:40:36 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id f8QEeaW19589;
	Wed, 26 Sep 2001 16:40:36 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: "Tolga Konik" <konik@umich.edu>,
   "SWI Mailing List" <prolog@swi.psy.uva.nl>
Subject: Re: [SWIPL] loading a foreign library for qsave_program
Date: Wed, 26 Sep 2001 16:34:47 +0200
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <NEBBLPCJCHMNCECAGHJJAEGLCBAA.konik@umich.edu>
In-Reply-To: <NEBBLPCJCHMNCECAGHJJAEGLCBAA.konik@umich.edu>
MIME-Version: 1.0
Message-Id: <01092616403500.19526@gollem>
Content-Transfer-Encoding: 8bit

On Mon, 13 Aug 2001, Tolga Konik wrote:
>I try to compile the following as a standby program.
>
>call_prolog_help:-
>	help.
>
>:-qsave_program(x,[toplevel(call_prolog_help)]).
>
>----------
>
>
>when it runs as stand alone, i receive the error that the library
>foreign(pl2xpce) does not exists. It seems that some of the neccessarily
>libraries are not loaded automatically. Any suggestions?

Depends a bit on the OS you are using.  Most people not mentioning
talk Windows, so lets assume that.  x.exe needs to be able to find
pl2xpce.dll and a couple more.  You achieve that in one of 4 ways:

	* Place x.exe in the Prolog `bin' folder
	* Add the Prolog `bin' folder to %PATH%
	* Copy the DLL files from the Prolog `bin' folder to the
	  Windows system directory
	* Copy the DLL files from the Prolog `bin' folder to the
	  folder containing x.exe.

The `best' solution depends on what you want to achieve.  Personally
I dislike copying things to the Windows system directory.  Doing so
in the Prolog installation would actually solve these problems, but
it makes it very messy especially if you have more than one version
around!

	Cheers --- Jan

