This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: how to build gsl dll

Mirko Vukovic schrieb:
On Mon, Feb 18, 2008 at 11:01 AM, Reini Urban wrote:
2008/2/17, Mirko Vukovic:
I am trying to build a dll for gsl. I want to link it to clisp.
 I would suggest not to use a static clisp module, just use the FFI.
 This is much simplier, smaller and easier to test. See libsvm or matlab,
 or pari for a more optimized binding.

 I want to do this for my gdi module also, but had no time yet.
 And we still have no header parser, which could construct the
 FFI binding automatically. cffi might be useful.

The reason why I need cffi is that I am trying to get nlisp to work on
clisp+cygwin.  And nlisp is using cffi.  I have nlisp running at work
on linux+sbcl, but my laptop has only cygwin.

$ cygcheck /bin/cyggsl-0.dll f:\cygwin\bin\cyggsl-0.dll f:\cygwin\lib\lapack\cygblas.dll

Are you sure you have /lib/lapack or /usr/lib/lapack added to your path?

I posted a message on the cffi mailing list, and Luis is helping me there.


So I had to create a small patch

(cffi:define-foreign-library libgslcblas
  (:darwin "libgslcblas.dylib")
  (:unix (:or "cyggslcblas-0.dll" "" ""))
(cffi:define-foreign-library libgsl
  (:darwin "libgsl.dylib")
  (:unix (:or "cyggsl-0.dll" "" ""))
(cffi:define-foreign-library libsndfile
  (:darwin "libsndfile.dylib")
  (:unix (:or "cygsndfile-1.dll" "" ""))

Luís, cannot this be a bit simplified for :cygwin?
I've always have to do this.
"" can be automatically translated to "cygsndfile-1.dll". Unfortunately :cygwin is no define-foreign-library target, just :unix.

fixnum and double-float just name clisp types, no classes yet. This is just for cmucl/sbcl so far. CLHS does not require those.
The clisp numeric classes are listed in the impnotes Chapter 4.4. (NUMBER, COMPLEX, REAL, FLOAT, RATIONAL, RATIO, INTEGER)

Now (ASDF:OOS 'ASDF:LOAD-OP :NLISP) prints tons of FFI::FOREIGN-LIBRARY-FUNCTION warnings, but works fine.
Reini Urban

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]