[cffi-devel] trouble loading dll via cff:use-foreign-library
Mirko.Vukovic at gmail.com
Mirko.Vukovic at gmail.com
Mon Feb 18 03:54:51 UTC 2008
I posted this message on c.l.l, where it was suggested that I try this
mailing list.
I am trying to link to Gnu Scientific Library into clisp (2.44) on
cygwin (I am trying to get nlisp running on cygwin)
(On cygwin, the shareable libraries (dll's) are prefixed with cyg, and
live in /bin (linked to /usr/bin)).
I tried several variants of (cffi:define-foreign-library libgsl ...)
Here is the transcript of one:
CL-USER> (defpackage :cffi-user
(:use :common-lisp :cffi))
#<PACKAGE CFFI-USER>
CL-USER> (in-package :cffi-user)
#<PACKAGE CFFI-USER>
CFFI-USER> (cffi:define-foreign-library libgsl
(:unix (:or "/bin/cyggsl-0.dll")))
LIBGSL
CFFI-USER> (cffi:use-foreign-library libgsl)
; Evaluation aborted.
CFFI-USER>
The error message is
Unable to load any of the alternatives:
("/bin/cyggsl-0.dll")
[Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
I tried other alternatives, such as not specifying the full path in
the library definition, and also setting the cffi:*foreign-library-
directories*, but none of them could load the library.
I can (probe-file and (probe-directory, so I think I am OK there.
Anything obviously wrong in my definitions?
Thanks,
Mirko
More information about the cffi-devel
mailing list