Subject: Re: [SWIPL] Questions about SWI-Prolog/C++

From: Jan Wielemaker <[email-masked]>
Date: Wed, 26 Sep 2001 12:21:07 +0200

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