[plt-scheme] reload library with get-ffi-obj for unit testing C libs

From: Eli Barzilay (eli at barzilay.org)
Date: Wed May 27 23:57:47 EDT 2009

On May 27, Scott Hickey wrote:
> I am using DrScheme to write unit tests for a C library I am working
> on, using the FFI function get-ffi-obj .
> My tests run fine from the command line and from DrScheme. When I
> change the C library and rerun tests from the command line, the tests
> use the latest version of the C library under test. When I rerun test
> from DrScheme, the original version of the library is still being used
> instead of the latest one.
> Is there something I can configure in DrScheme so that my tests will
> always access the latest version of the C library I am testing?

No -- there is no way to unload a shared library, so the first version
loaded is what you get.  It probably works for you with mzscheme
because you're running a new mzscheme process every time.

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

Posted on the users mailing list.