Quote:
>Hi guys,
>I am just getting started on this so I can't really go into too much
>detail, but I need to build an expert system in prolog, and do the user
>interface for it in C. Building the expert system is not that big of a
>deal and I am pretty sure on the prolog code, but I don't know much at all
>about embedding that to C. I AM a much much better in C than in prolog,
>but I can't seem to find much on the web about this.
>After doing some research, I found that I need the include file
>SWI-Prolog.h
SWI-Prolog.h is distributed with each copy of the system in the
include subdirectory. SWI-cpp.h is the C++ wrapper and used to
be distributed as a seperate package (actually a real C++ programmer
(Volker Wysk) is currently revising the C++ interface).
Quote:
>but SWI's sight only has the object oriented version, SWI-cpp.h
>Does anybody know a good source of info on this, or even better, give me
>an overview of how to go about embedding the prolog code into C? The
>biggest thing that's baffeling me is which program is responsible for the
>actual compiliation of code, my C compiler, or SWI?
Whichever you prefer. You can do everything yourself using your standard
C tools or you can give part of the job to plld, a front-end that knows
how to call the C-compiler and linker. The C-compiler is quite trivial
(plld justs add a -I to the include directory, so the correct SWI-Prolog.h
is found). The linker is a bit more hairy. The manual gives an overview.
The twiki web reachable through the home-page adds details on a number
of platforms. You can run plld -v ... to see what it is doing.
Quote:
>Any help about this is greatly appreciated. thank you.
--- Jan