Re: modules and C

2007-03-22 Thread Marco Maggi
"David Fang" wrote: > What do I need to do to export my scm_c_define_gsubr'd > functions to the module? YMMV. This is what I do: 1. write a C module with its own initialisation function, let's say that the module's file is "module.c" : /* C module */ #include /* module functions h

Re: modules and C,C++

2007-03-22 Thread David Fang
> > > What do I need to do to export my scm_c_define_gsubr'd > > functions to the module? Must I wrap them into another module in C, and > > use-module it? (Would I expect the same problem with mixing > > load-extensions with modules?) > > You will want to read about scm_c_export() and scm_

Re: modules and C++

2007-03-22 Thread Daniel Llorens del Río
On 22 Mar, 2007, at 18:01, [EMAIL PROTECTED] wrote: David Fang <[EMAIL PROTECTED]> wrote: Hi, I'm having a bit of trouble using a symbol I defined in C from a module: What do I need to do to export my scm_c_define_gsubr'd functions to the module? Must I wrap them into ano

Re: modules and C

2007-03-21 Thread dsmich
David Fang <[EMAIL PROTECTED]> wrote: > Hi, > I'm having a bit of trouble using a symbol I defined in C from a > module: > What do I need to do to export my scm_c_define_gsubr'd > functions to the module? Must I wrap them into another module in C, and > use-module it? (Would I

modules and C

2007-03-21 Thread David Fang
Hi, I'm having a bit of trouble using a symbol I defined in C from a module: In a .cc file, I've defined some_C_function(), and exposed it to guile via scm_c_define_gsubr("some-C-function", ...), which is called upon initialization as part of an inner_main() passed to scm_shell().