guile-user
[Top][All Lists]
Advanced

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

Re: statically linking in srfi modules


From: Mark H Weaver
Subject: Re: statically linking in srfi modules
Date: Sat, 09 Feb 2013 10:32:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Richard Shann <address@hidden> writes:
> Well it seems I may have been premature in saying that srfi-1 was
> successfully loaded. Although the error message is gone, there is no
> symbol 'map which srfi-1 should have re-defined. 
> Can someone suggest what this might be a symptom of? 

I wrote:
> I know what's wrong.  Please try replacing the calls to
> 'scm_c_register_extension' with the following:
>
>   scm_c_define_module ("srfi srfi-1",  init_srfi_1,  NULL);
>   scm_c_define_module ("srfi srfi-60", init_srfi_60, NULL);
[...]

Sorry, this isn't quite right either.  Instead of the above, please try
replacing the calls to 'scm_c_register_extension' with the following:

  scm_c_call_with_current_module (scm_c_resolve_module ("srfi srfi-1"),
                                  init_srfi_1, NULL);
  scm_c_call_with_current_module (scm_c_resolve_module ("srfi srfi-60"),
                                  init_srfi_60, NULL);

Where 'init_srfi_1' and 'init_srfi_60' are defined as follows:

  static SCM
  init_srfi_1 (void *dummy)
  {
    scm_init_srfi_1 ();
    return SCM_UNSPECIFIED;
  }

  static SCM
  init_srfi_60 (void *dummy)
  {
    scm_init_srfi_60 ();
    return SCM_UNSPECIFIED;
  }

Hopefully this will work.  I'm too lazy to try it myself.

      Mark



reply via email to

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