Re: [eclipse-clp-users] ec_external definition not included if EC_EMBED is defined.

From: Kish Shen <kisshen_at_cisco.com>
Date: Fri, 30 Nov 2012 17:51:47 +0000
Hi Oreste,

As I think Joachim may still be on holiday, I will try and give you some 
answer to your question...

Yes, it does look like if you include eclipse.h, this defines EC_EMBED, 
and so ec_external() would not be available for use.

It is not clear to me that the error is therefore ec_external() should 
be moved out of the EC_EMBED ifdef, because I am not sure if 
ec_external() was deliberately excluded (or removed, after the manual 
was written) from the C/C++ interface, and the error (in this case) 
would be mentioning it in the embedding and interface manual.

The usual way of linking predicates defined in C/C++ is to do it in the 
ECLiPSe code via external/2, after the creation of the module for the 
ECLiPSe code, but before the use of the external predicate. Using 
ec_external() is given as an alternative to doing this in C rather than 
ECLiPSe, but it is not clear to me how useful this is, because the 
intended usage of the C interface is for ECLiPSe code to be in its own 
file, rather than as part of the C program file, so using external/2 
seems the most natural way to include external predicates.

Do you have a use case for using ec_external(), where you think it would 
be useful?

Cheers,

Kish

On 27/11/2012 18:40, Oreste wrote:
> Hi,
> I am working on external predicates implemented in C.
> I have just seen that int ec_external(dident pred, int(*fct)(), dident
> module) definition is not included if EC_EMBED is defined.
> See embed.h.
>
> I guess this is a bug because in the documentation this function is
> declared as part of embedded interface.
> Is this correct ?
>
> Best Regards
> Oreste Bernardi
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
>
Received on Fri Nov 30 2012 - 18:26:38 CET

This archive was generated by hypermail 2.2.0 : Sat Dec 01 2012 - 06:15:32 CET