[Openmcl-devel] Calling Lisp from Objective-C bundle

Gary Byers gb at clozure.com
Sun Jul 1 00:13:55 PDT 2007



On Sat, 30 Jun 2007, yakov.zaytsev at gmail.com wrote:

> Can anyone point me towards an example that shows how to call a Lisp
> function from Objective-C and how to link that into your Objective-C bundle.
>

I'm not sure that I fully understand your question, but:

You can't refer to lisp functions (or to symbols that name them, or to any
other kinds of lisp objects) from foreign code in OpenMCL.

You can (using OBJC:DEFMETHOD) define ObjC-callable methods that are
implemented in lisp, and pass foreign arguments to and return foreign
results from those methods.  There are lots of examples of this
in the ccl:examples; directory.


> Bundle must have entry point C function that conforms to specific
> signature..
> Ideally, I would call Lisp from that and get back to Lisp-Objective-C bridge
> after calling Objective-C and C functions
>
>
> Thanks in advance,
>
>
> PS
> Bundle is loaded at runtime in Carbon app
> I have static library with necessary C functions which I plan to call...
>
> Yakov
>



More information about the Openmcl-devel mailing list