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] |
Marius Vollmer <mvo@zagadka.ping.de> writes: > I'm experimenting with a new approach in guile-gtk, the Guile bindings > to Gtk+ (and Gnome). There, *every* module is required to be a *.scm > source file. Such a Scheme file might decide to load and merge > compiled code from a shared library, with a call to > `merge-compiled-code'. Like > > (define-module (gtk gdk) > :use-module (gtk dynlink)) > > (merge-compiled-code "sgtk_init_gtk_gdk_glue" "libguilegtk") > > The shared library "libguilegtk" is searched in the usual places that > the runtime linker would try. In addition, the current implementation > does some magic with installed libtool *.la files to get inter-library > dependencies and versioning right. I expect to find this magic in dld > in the future, or at least in the Guile core. > > [This also works when -lguilegtk has already been linked at compile > time, regardless whether shared or static.] It might be worth having all modules work this way (that is, external module-description files); then one wouldn't need to do anything special to convert random scheme files to modules. Maybe this isn't necessary. I'm jst looking at Scheme48; they seem to have a good thing going. Andrew