Re: Calling Eclipse functions from C++

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Thu 07 Jul 2005 05:26:48 PM GMT
Message-ID: <42CD65D8.80906@icparc.ic.ac.uk>
Roman Buil wrote:
> Hello,
> I am programming in C++ and calling Eclipse 5.8. (Under windows)
> I have been trying all options to compile my Eclipse file from C++ but I
> get an error: 
> "File does not exist in compile(predicate)"
> 
> The options I have tried are:
> 
> 	1.-	post_goal(term(EC_functor("compile",1),"predicate"));
> 	2.-	post_goal("compile(\"predicate\")");
> 	3.-	post_goal("compile('predicate')");

These are all correct.


 >
 > The file is predicate.ecl and I have saved it in all possible path where
 > I thought that Eclipse expect, but it doesn't still work.

ECLiPSe expects the file in the process's "current directory".
Which one this is is not under ECLiPSe's control. If your main
program is started by some C++ development system, then god knows
where it chooses to start its processes in...

You could of course specify an absolute pathname to your ecl file, e.g.

post_goal(term(EC_functor("compile",1),"//C/foo/bar/predicate"));

(but note the generic ECLiPSe pathname syntax, see os_file_name/2)


> And another question is: In the section 3.4 of the "Embedding and
> Interfacing Manual" says that the ec_xt_double_arr is a predefined
> method table for arrays of doubles. How could I use it? Do I have to
> compile any other file? I get this error:
>  
> "error C2065: 'ec_xt_double_arr' : undeclared identifier"

This is probably a problem with symbol mangling in your compiler.
Different compilers use different conventions, it is very hard for
us to investigate this.


-- 
  Joachim Schimpf              /             phone: +44 20 7594 8187
  IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
  Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Thu Jul 07 18:28:25 2005

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