On Fri, 2013-02-08 at 13:02 +0000, Richard Shann wrote: > Hmm, I can't find scm_c_register_extension in the guile reference index, > and though including libguile.h finds the function I get the error > message scm_init_srfi_1 undeclared... > Hunting around for this symbol I see the header srfi-1.h with it > declared but > #include "guile/srfi/srfi-1.h" > gives a heap of errors...
Oh, sorry, that was daft, I needed to include libguile before that header. Now it won't link ... so we will need to find the right library name to link to... Richard > > It looks like this module is the only one doing the dynamic loading > thing, judging by grepping for extension in the files, but is there a > way of knowing? > > Thanks in advance, > > Richard > > > > On Fri, 2013-02-08 at 12:27 +0100, Andy Wingo wrote: > > On Fri 08 Feb 2013 10:25, Richard Shann <richard.sh...@virgin.net> writes: > > > > > On Fri, 2013-02-08 at 09:24 +0000, Richard Shann wrote: > > >> Is it possible to statically link in the srfi modules? > > >> (load-extension "libguile-srfi-srfi-1-v-3" "scm_init_srfi_1") > > >> fails. > > > > You can link it in I think, but then you will need to call > > > > scm_c_register_extension ("libguile-srfi-srfi-1-v-3", "scm_init_srfi_1", > > scm_init_srfi_1, NULL) > > > > somewhere in your C code. > > > > > Oh - sorry, I should have mentioned, we are still on guile 1.8 (perhaps > > > for no good reason?), if that affects the answer. > > > > Same answer. Guile 2.0 is much faster if that matters to you :) > > > > Andy >