This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gtk or sql as module?


Russ McManus <russell.mcmanus@gs.com> writes:

> If the distributed packages don't support dynamic loading, or your
> platform doesn't, then you will need to build the combined guile
> executable yourself.

Yes, exactly.  I don't think that building this executable is overly
difficult.  For example, here is the complete main.c from guile-gtk:

    /* Generated by build-guile-gtk.  Do not edit. */

    #include <libguile.h>
    #include <guile-gtk.h>

    void sgtk_init_gtk_gtk_glue ();
    void sgtk_init_gtk_gdk_glue ();

    static void
    inner_main (void *closure, int argc, char **argv)
    {
      SGTK_REGISTER_GLUE (sgtk_init_gtk_gtk_glue);
      SGTK_REGISTER_GLUE (sgtk_init_gtk_gdk_glue);
      sgtk_shell (argc, argv);
    }

    int
    main (int argc, char **argv)
    {
      scm_boot_guile (argc, argv, inner_main, 0);
      return 0; /* never reached */
    }

As you can see, this is as minimal as it gets.  The main functions of
other Guile modules should have a very similar structure.  You can
probably very easily merge them into one.