Re: Calling Eclipse from C

From: Joachim Schimpf <js10_at_icparc.ic.ac.uk>
Date: Tue 09 Mar 1999 05:57:35 PM GMT
Message-ID: <36E5610F.41C67EA6@icparc.ic.ac.uk>
Ian Oliver wrote:
> 
> Has anyone used the
> prolog_call and prolog_call_nobind macros for calling prolog from an
> external predicate written in C?
> (p.170 ECLIPSE 3.5 user manual)
> 
> Would it be possible for you to send me some example C source code
> utilising these macros as the user manual I have is a little terse on
> their use,

It is usually a bad idea to call Prolog from an external predicate
because that creates some problems related to garbage collection,
event handling etc.  You will get into less trouble if you organise
your code such that the C parts are small self-contained primitives.

Note also that the C interface of release 3.5 is now deprecated.
As of release 3.6 (current is 4.1!) Eclipse defines a new C/C++
embedding interface which cleanly supports calling Prolog from
a C/C++ main program (but not from an external predicate).

If for some reason you are stuck with version 3.5, I can mail
you some working code...

------------------------------------------------------------------------
 Joachim Schimpf                /               phone: +44 171 594 8187
 IC-Parc, Imperial College     /              mailto:J.Schimpf@ic.ac.uk
 London SW7 2AZ, UK           /      http://www.icparc.ic.ac.uk/eclipse
Received on Tue Mar 9 18:13:51 1999

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:04 PM GMT GMT