Calling Lisp from C (SBCL as a shared object)
"J. Gareth Williams" <[email protected]> Fri, 17 Jan 2025 22:55:39 -0500
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CALfqwApZb5UNJF1T9X=cU6ZaeKzXWOyQtSKq8mzB0zXSn9ukZA@mail.gmail.com> |
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