Re: Calling Lisp from C (SBCL as a shared object)
Robert Smith <[email protected]> Sat, 18 Jan 2025 01:34:02 -0800
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CAPbE8xDmu0PbuEHVwzk5ErQRwWA6_4JrF39RE-r7OZfbbUxKQg@mail.gmail.com> |
Try SBCL-LIBRARIAN: https://github.com/quil-lang/sbcl-librarian https://lispcookbook.github.io/cl-cookbook/dynamic-libraries.html Robert On Fri, Jan 17, 2025 at 21:02 J. Gareth Williams <[email protected]> wrote: > Hi, > > I have been struggling to get even a trivial example of > DEFINE-ALIEN-CALLABLE to work, and was wondering if anyone could take a > look at what I might be doing wrong. > > Full source: > git clone https://gitlab.com/garethw14/simple-sbcl-alien-callable.git > > It compiles okay and links, but on initialize_lisp(), I land in the > debugger: > > --- > In main, about to initialize_lisp() > > debugger invoked on a SB-KERNEL::UNDEFINED-ALIEN-VARIABLE-ERROR in thread > #<THREAD "main thread" RUNNING {10013A8003}>: > > * Attempt to access an undefined alien variable.* > Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [ABORT] Exit from the current thread. > > ("foreign function: call_into_lisp_") > 0] > --- > > I've tried some other examples I've found around the web, but they seem to > yield the same result. > > Tested on Debian 12.9, SBCL versions 2.5.0 and 2.3.2 > > Would appreciate any insight! > > gareth > > > > _______________________________________________ > Sbcl-help mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sbcl-help > _______________________________________________ Sbcl-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-help