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?


I think you'll find that recent guile-gtk can be invoked from regular
guile with

(use-modules (gtk gtk))

and then it dynlinks in.  The dynamic linking scheme for guile-gtk has
some scheme code that the above loads, which then searches for and
dlopens the various libraries (guile-gtk itself, as well as gtk and
X).  Then, it calls an init function, which does the gh_ calls to
register the procedures.

What Russ said sounds totally right, too - I don't mean to imply
otherwise.  You just shouldn't have to do that with guile-gtk, since
it is already set up for dynamic loading.  I've had a stock guile
1.3-current dynlinking in gtk and also some of my own stuff:

  fnord gdt 134 ~ > guile
  guile> (use-modules (gtk gtk))
  (dlopening "libm.so" "/usr/lib/libm.so.2.0")
  (dlopening "libm.so" "/usr/lib/libm.so.2.0")
  (dlopening "libX11.so" "/usr/X11R6/lib/libX11.so.6.1")
  (dlopening "libXext.so" "/usr/X11R6/lib/libXext.so.6.1")
  (dlopening "libglib.so" "/usr/gnome/lib/libglib.so")
  (dlopening "libgmodule.so" "/usr/gnome/lib/libgmodule.so")
  (dlopening "libgdk.so" "/usr/gnome/lib/libgdk.so")
  (dlopening "libgtk.so" "/usr/gnome/lib/libgtk.so")
  (dlopening "libguilegtk-1.1.so" "/usr/obs/lib/libguilegtk-1.1.so.0.0")
  guile>

So, you can run the guile built by one package, and load the other
package dynamically.  Ideally you could load them both dynamically.


        Greg Troxel <gdt@ir.bbn.com>