|
| From: | Joel Reymont |
| Subject: | Re: [Chicken-users] Units as shared libraries (SWING, dynamic, does not work) |
| Date: | Mon, 13 Dec 2004 09:11:38 +0000 |
> felix winkelmann wrote:
>Actually `load-library' should work here, provided the code has
>been compiled like a normal shared library
>
>% cat yo.scm
>(declare (unit yo))
>(print "yo!")
>% csc yo.scm -vc
>/usr/local/bin/chicken yo.scm -output-file yo.c -quiet
>gcc yo.c -o yo.o -g -c -DC_NO_PIC_NO_DLL
>rm yo.c
>% gcc yo.o `chicken-config --libs --cflags` -shared -o libyo.so
>% csi
>; loading /usr/local/lib/chicken/debug.so ...
>; loading library posix ...
>; loading library srfi-1 ...
>#;1> (load-library 'yo "./libyo.so")
>; loading library yo ...
>yo!
>#t
This is sort of a non-issue now as John Lenz added a -nounit option to
SWIG to generate wrapper code without the unit declaration. Thank you for
the workaround, Felix!
Joel
--
OpenPoker: The Linux of poker software
http://wagerlabs.com/forums
Tenerife: Canary Islands: Spain
| [Prev in Thread] | Current Thread | [Next in Thread] |