guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A [serious] problem with module integration


From: Mike Gran
Subject: Re: A [serious] problem with module integration
Date: Fri, 16 Nov 2012 08:03:59 -0800 (PST)

Hello Panicz-

> From: Panicz Maciej Godek <address@hidden>
> And now I have a problem: the modules that I wrote make use
> of the symbols defined by my application (using scm_c_define...),
> but they are unavailable outside my application, i.e. for external
> modules.

[snip]

I read this, and I am having a bit of trouble visualizing
what you've done, but, perhaps your problem can be fixed
by simply replacing scm_c_define with scm_c_export.
 
So try that first.

In any case, I pretty sure I did what you are trying to
when I added guile handling to a private build of the Zile
editor.  Re http://github.com/spk121/zile .  This is a bit
more elaborate because I wanted my exported functions
to be in their own named module

If I recall correctly, (cause I haven't touched this code
in a while), in my C code that defines the Guile exports,
I did this.

- created a new module called 'zile' to hold my functions using
  scm_c_resolve_module("zile")
- defined my functions into that module with 
  scm_c_export
- switched back to the (guile user) environment
  with scm_c_resolve_module("guile-user")
- loaded my newly defined module using
  scm_c_use_module("zile")

Hope this correct, and that it helps.

-Mike Gran




reply via email to

[Prev in Thread] Current Thread [Next in Thread]