Olá,
On 12/02/07, Edgar Gonçalves edgar.goncalves@gmail.com wrote:
- Unlike AllegroCL or Lispworks, Clisp (and SBCL too, btw) requires me to
precede all defcfuns related to a library with:
#+clisp (cffi::use-foreign-library Tcl) (defcfun ("Tcl_FindExecutable" tcl-find-executable) :void (argv0 :string))
That doesn't sound right. You should only need to call (use-foreign-library tcl) only once, some time before you load your bindings.
- When I load the saved image (using the code from above), I get an error
when applying defcfun'ed functions, telling me the library wasn't found:
Just tested with GNU CLISP 2.41 (2006-10-13) on OSX. Loaded cffi-test, saved an image (tried with ":executable t" too), restarted with the image, and ran (rt:do-tests) and it works. (Except some funcall.* tests fail at first, for some reason. I blame it on some RT weirdness.)
AFAICT, CLISP correctly reloads the libraries at startup. Can you try this with cffi-test or otherwise provide some sort of test case?