From jan@swi.psy.uva.nl Mon Dec 17 16:32:13 2001
Received: from gollem.swi.psy.uva.nl (root@gollem.swi.psy.uva.nl [145.18.152.30])
	by swi.psy.uva.nl (8.11.6/8.11.2) with ESMTP id fBHFWD528165;
	Mon, 17 Dec 2001 16:32:13 +0100 (MET)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) id fBHFWDQ04891;
	Mon, 17 Dec 2001 16:32:13 +0100
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: "Ioannis Partsakoulakis" <jpar@aegean.gr>, <prolog@swi.psy.uva.nl>
Subject: Re: [SWIPL] foreign library
Date: Mon, 17 Dec 2001 16:17:53 +0100
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <PIEMJIMCPILKJIDGLNEIEEHGCAAA.jpar@aegean.gr>
In-Reply-To: <PIEMJIMCPILKJIDGLNEIEEHGCAAA.jpar@aegean.gr>
MIME-Version: 1.0
Message-Id: <01121716321301.04787@gollem>
Content-Transfer-Encoding: 8bit

On Sun, 16 Dec 2001, Ioannis Partsakoulakis wrote:
>I have deifned a C++ method like the following
>
>PREDICATE(iniagent,0) {
>    ...
>}
>
>and have created a dll file. I can load this dll from a prolog file called
>ica.pl by adding
>
>:-load_foreign_library('c:/icagent/debug/icai.dll').
>
>and all goes fine when I call iniagent method from prolog.
>
>I saved the ica.pl as a qlf file and now I want to make a new C++ file that
>loads ica.qlf and calls the iniagent predicate. However, when I call
>predicate iniagent from the C++ file I get the message "Undefined procedure
>iniagent/0".

It isn't completely clear what you (try to) do.  Some things to look at:

	* If you want directives to work in states, make sure to tag
	  them using initialization:

	  :- initialization load_foreign_library(...).

	* Are there module problems?

	* Are there any error messages or warnings?

If this doesn't fix it, try to compile a small suite of files
demonstrating the problems, so we don't have to guess on the
(often important) details of your setup.

	--- Jan

