[plt-scheme] loading libraries into memory with ffi-lib on osx

From: Jon Rafkind (workmin at ccs.neu.edu)
Date: Sun Aug 27 20:12:30 EDT 2006

The Allegro library that I have been working with depends on libz and
libpng to function so normally I load those libraries into main memory
so that all the symbols can be found. Something like

(ffi-lib "libz")
(ffi-lib "libpng")
(define liballegro (ffi-lib "liballeg"))

This works fine in linux and windows but on OSX it doesnt seem to work.
I have to put libz and libpng in /usr/lib or /usr/local/lib otherwise I
get undefined symbol errors when loading liballeg. Does the ffi-lib
mechanism work differently in OS X? I dont want to force users to have
these libraries in /usr/lib or /usr/local/lib, they should be in the
planet cache directory.

And for anyone thats sort of been following Allegro, it works on OSX
now, I just need to clean a few details up.


Posted on the users mailing list.