[cffi-devel] Re: Clisp, cffi and defcfuns in a saved image
Edgar Gonçalves
edgar.goncalves at gmail.com
Tue Feb 13 13:04:42 UTC 2007
On 2/13/07, Edgar Gonçalves <edgar.goncalves at gmail.com> wrote:
> I'll try again making it work with my clsql project, and I'll post
> back my success.
>
Eh, guess not, after all. The problem seems to reside somewhere betwee
clsql-odbc and CFFI's uffi-compat.lisp.
The following is related to the initialization function of the saved
image. It assumes the cl-sql library was already loaded AND used
properly before the image was saved.
What I do before using the foreign functions is to call
(clsql-sys:database-type-load-foreign :odbc), and this calls
uffi:load-foreign-library, defined in cffi's uffi-compat.lisp, with
the odbc32.dll filename. This, by its turn, calls
cffi:load-foreign-library, which is the same as to call
cffi::use-foreign-library. So, even though the result should
apparently be the same, I still get this:
** - Continuable Error
FFI::FOREIGN-CALL-OUT: no dynamic object named "SQLAllocHandle" in
library :DEFAULT
But then again, if I manually call (cffi::use-foreign-library
"odbc32.dll"), what I get is something different:
*** - FFI::FOREIGN-CALL-OUT: #<INVALID FOREIGN-POINTER #x00000000>
comes from a previous Lisp session and is
invalid
What am I missing here?
--
Edgar Gonçalves
More information about the cffi-devel
mailing list