At Tue, 11 Sep 2018 20:35:46 -0400, David Storrs wrote:
> If I get a new version of libsqlite3 and put it in some per-user directory,
> how can I tell the Racket db module to link the SQLite code against this
> new library instead of the outdated default system one?

The simplest approach is to put "libsqlite3.dylib" in Racket's "lib"
directory. Read further only if that's not good enough.


The parts of Racket that load foreign libraries generally go through
`ffi-lib`. There's a search path description in the docs for `ffi-lib`,
but it chains to several other things.

Mostly, the search path is based on `get-lib-search-dirs` from
`setup/dirs`. That search path can be configured though Racket's
"etc/config.rktd", but that's probably not what you want to change. The
first result from `get-lib-search-dirs` is a user-specific directory;
that's probably not what you want, either, but it's based on
`(find-system-path 'addon-dir)` and the Racket version number (or, more
precisely, the installation name).

Finally, the last step in the `ffi-lib` search is to let the OS perform
it's own search. If I remember correctly, Mac OS will search based on
the `DYLD_LIBRARY_PATH` environment variable.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to