[cffi-devel] Default library suffix for OS X / Intel under OpenMCL

Luís Oliveira luismbo at gmail.com
Tue Jul 17 23:45:41 UTC 2007


On 18/07/07, David Haley <dchaley at gmail.com> wrote:
>         '(;; OS/CPU features.
>           #+darwinppc-target  cffi-features:darwin

Indeed, cffi-features:darwin should also be pushed on darwin/x86(-64).


> The problem is that load-foreign-library from libraries.lisp only
> tries to grab the default suffix (which in this case is .so) and then
> fails to find the .dylib library.

(cffi:define-foreign-library libssl
  (:windows "libssl32.dll")
  (:unix (:or "libssl.so.0.9.8" "libssl.so"))
  (t (:default "libssl3")))

Since cffi-features:unix is present on *features* when running on
MacOS X, load-foreign-library will pick that :unix clause. The way to
fix this is add a (:darwin "libsslwhatever.dylib") clause before the
:unix one.

HTH

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list