[plt-scheme] SQLite

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jan 30 11:53:08 EST 2007

On Jan 30, Gregory Woodhouse wrote:
> Come to think of it, I've lost track of the original question. Is it
> where to search for dynamic libraries, or where to put them so
> dlopen() will find them?

A good summary of the problem is this (incorrect) blurb from Jay's
sqlite library:

  If you have a problem loading the sqlite library, you need
  to change one of the first lines to the commented out
  line. This seems to be a problem with the FFI library.  If
  you are changing _sqlite.ss_ you will probably need to look
  at this, but otherwise you won't.

which refers to these lines in "sqlite-ffi.ss":

  (define sqlite (ffi-lib "libsqlite3"))
  ;(define sqlite (ffi-lib "/sw/lib/libsqlite3"))

The text is incorrect -- there is no problem with the foreign
interface.  If you use "libsqlite3" for the library name, it will
simply use `dlopen()' with "libsqlite3.dylib" on OSX.  The real
problem is that `dlopen()' will not (AFAIK) look for the library in
places like "/sw/lib" in the default configuration.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.