More detailed embedding example

Morgan Howe mthowe at gmail.com
Sun Sep 27 23:23:55 UTC 2015


Hey guys,

I'm playing around with embedding ECL into a C program. I've followed
the blog post which was very useful, but as far as calling lisp
functions, didn't really get beyond the cl_safe_eval type operations.
I'd like to be able to get a handle to a specific lisp function, and
call that function passing some arguments. What I've tried is
basically this series of steps (omitting boot, shutdown, etc for
brevity):

* cl_safe_eval some code doing (load "foo.lisp") // From the blog
example, works fine
* ecl_make_symbol("BAR", "CL-USER") // Quite sure this is where I'm going wrong
* cl_funcall the symbol from step 2, which gives me this a few times
before dropping to debugger:
Condition of type: SIMPLE-ERROR
0 is an illegal frs index.
No restarts available.

I'm sure step 2 is where I'm going wrong and the symbol I try to
retrieve is not valid, thus the issue in step 3. Sorry if this is too
basic a question, but could someone give me a working example of doing
something like this?

Thanks,
Morgan



More information about the ecl-devel mailing list