Re: Embedding ECL in a C++ app.
Juan Jose Garcia Ripoll <
lisp@...>
2006-02-06 10:49:14 GMT
On Thu, 2006-02-02 at 14:53 +0200, Ivan Toshkov wrote:
> At last, a few days ago a colleague of mine actually found the
> problem: ECL and our system both had the same file named "config.h".
> They both were in the include path, but ours was first, so ECL found
> it and, naturally, failed to compile.
> So, my first suggestion is to move most of the include files in a
> subdirectory, named e.g. "ecl" and include them like this:
>
> #include <ecl/config.h>
I take note.
> BTW, I found that at cl_defvar and cl_defparameter are declared in the
> external.h but are never defined. Should be easy to remove them, but
> probably better to implement?
They do no longer exist. cl_* refer only to lisp functions and not to
special forms so as to keep things consistent. You can, however, define
a simple macro
#define ecl_defparameter(s,v) \
do { si_Xmake_special(s); ECL_SETQ(s,v); } while (0);
I might include it in the next release. Seems harmless.
> 1. How to catch errors in the C++ part? I use si_safe_eval to run
> the Lisp code. When there is an error in it, the Lisp debugger runs.
> In a while, I'd probably try to have a REPL, listening on a different
> port, but for now (and for the production system), I'd like to just
> log the error.
(Continue reading)