-To use LOAD-SHARED-OBJECT, at the Unix command line do this:
-
- echo 'int summish(int x, int y) { return 1 + x + y; }' > /tmp/ffi-test.c
- make /tmp/ffi-test.o # i.e. cc -c -o /tmp/ffi-test.o /tmp/ffi-test.c
- ld -shared -o /tmp/ffi-test.so /tmp/ffi-test.o
-
-Then in SBCL do this:
-
- (load-shared-object \"/tmp/ffi-test.so\")
- (define-alien-routine summish int (x int) (y int))
-
-Now running (summish 10 20) should return 31."
+References to foreign symbols in loaded shared objects do not survive
+intact through SB-EXT:SAVE-LISP-AND die on all platforms. See
+SB-EXT:SAVE-LISP-AND-DIE for details."