From jan@swi.psy.uva.nl Wed Sep 26 12:23:06 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 f8QAN5v03182;
	Wed, 26 Sep 2001 12:23:05 +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 f8QAN5M17356;
	Wed, 26 Sep 2001 12:23:05 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: "luca" <luca.cia@tiscalinet.it>, <prolog@swi.psy.uva.nl>
Subject: Re: [SWIPL] Questions about SWI-Prolog/C++
Date: Wed, 26 Sep 2001 12:21:07 +0200
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
References: <001601c13ecd$65e1d000$9ad4623e@locale>
In-Reply-To: <001601c13ecd$65e1d000$9ad4623e@locale>
MIME-Version: 1.0
Message-Id: <01092612230504.15353@gollem>
Content-Transfer-Encoding: 8bit

On Sun, 16 Sep 2001, luca wrote:
>
>Hello,
>
>I write you because I'm finding some difficulties to understand 
>how I can use SWI-Prolog with C++. 
> 
>I describe you what I'd like to do, so if you have some examples or documentation
>about this matter, it would be very nice if you, please, send me.
>
>I have to write a C++ program that use SWI-Prolog like a Logic Engine,
>what I'd like to do is to use a prolog algorithm, which use a set of rules, to answer a
>query....
>I try to be clearer:
>    from c++ program:
>    1- load prolog algorithm (it's a .pl-file already written)
>    2- load the set of rules, or generating them form C++ to Prolog rules
>    3- making query on it
>    4- using the answer in the C++ program
>
>I'm working with Microsoft VC++ 6.0.
>
>I read the "pl2cpp.pdf" documentation, I tried to use the examples I found 
>(also on SWI-Prolog website) but they didn't work properly on my computer.
>If it's possible I'd like to have something more about SWI-C++ 
>and some good examples.
>Thank you very much.

This is a bit too vague a question.  All what you want is easily
achieved, but it appears something's wrong with your setup between
MSVC and SWI-Prolog.  I'd suggest to make a small example, tell us
what you try and why and how it fails.

	--- Jan

