code in cvs is broken
Derek Atkins
warlord@MIT.EDU
15 Nov 2001 12:08:26 -0500
Bill Gribble <grib@linuxdevel.com> writes:
> We've been using the namign convention 'libgncmod-foo.la' for
> gnc-modules, to distinguish them from normal shared libraries. For
> example, libgncmod-engine.la is a gnc-module but libgncgnome.la is not.
Ok. (FTR, I did use libgncmod-busines-* in my code, so I'm at
least already following this convention).
> > Assuming I'm correct so far, then is it reasonable to have a
> > gnc-module gnucash/bar (similarly laid out as above), where bar.scm
> > has (gnc:module-load "gnucash/foo")?
>
> Yes, but it may not do exactly what you expect. the gnc-module system
> is outside the Scheme module system but has to live within its
> limitations where they interact. If you call (gnc:module-load
> "gnucash/foo" 0) within the Guile define-module block for (gnucash bar),
> the Scheme symbols for foo will only be visible within bar. If you want
> them to be visible to modules that module-load bar, you need to make
> sure to export them within bar.scm.
Got it.. That would explain part of my problem. Thanks for bearing
with me with my learning curve. ;)
> You can also do this by calling the gnc:module-load from C, inside the
> gnc_module_init function for bar. That's the recommended way to do it,
> because you can't guarantee that the module will be loaded from Scheme,
> and you want a C load to load dependent modules as well.
By "calling the gnc:module-load from C" do you mean:
gnc_module_load("gnucash/foo", 0)
or
gh_eval_str("(gnc:module-load \"gnucash/foo\" 0)");
or are they equivalent?
> b.g.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord@MIT.EDU PGP key available