-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I've just discovered scsh and it seems to fulfill most of my needs. To cover
the rest I'm trying to add RDF support to scsh by calling the Redland C
library.
Redland (0.9.16) provides a shared library, which I want to call from scsh
(0.6.6). I looked into the Scheme 48 manual and tried the approaches
mentioned there, but ran into problems. Perhaps somebody on this list has a
hint for me?
I loaded the lib via "dynamic-calls", and I tried the other approach and
linked the library with scsh, fater having generated a SWIG wrapper. With both
methods I get access to the defined funtions. Calling funtions without
arguments works, but as soon as I try to use parameters the problems start -
they don't seem to be passed properly. Example:
(dynamic-load "/usr/local/lib/librdf.so")
(define fw (get-external "librdf_free_world"))
(define iw (get-external "librdf_new_world"))
(call-external fw (call-external iw))
Calling librdf-new-world returns a pointer, which then can be passed as an
argument to librdf-free-world. The call to new-world returns something, but
passing this value back to free-world results in a NULL pointer
assignment/VM crash.
Is it possible to use scsh in this way? Or do I have to write glue libraries
for converting between scsh and Redland?
Thanks in advance,
Rainer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFA7V+2enjtlV2FwvQRAtB5AJ98ETzKnRbh8Gj077xAjDo7kMDc8gCfSR3e
TzduTkXLfp1W/CXfb4y1FwU=
=QMXl
-----END PGP SIGNATURE-----
|