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] |
Mariu, Thanks for your help. It's going well - I have got all the steps you mentioned working in a Makefile. With a bit of hacking I can get the library compiled, the bindings in guile done, and the whole lot loaded into a running image, and call one of the 'C' functions which returns a widget ! i.e. : guile> (use-modules (toolkits jgwm)) adding missing type `GdkOverlapType'. adding missing type `GdkWMDecoration'. adding missing type `GdkWMFunction'. adding missing type `GdkGC'. adding missing type `GtkOrientation'. adding missing type `GtkToolbarStyle'. adding missing type `GtkToolbarChildType'. adding missing type `GtkButtonBoxStyle'. adding missing type `GtkTreeViewMode'. adding missing type `GtkSpinButtonUpdatePolicy'. adding missing type `GtkCellType'. guile> (jgwm-root-new 46) #<JgwmRoot 87d90> guile> (jgwm-client-new 46) #<JgwmClient 11d260> I'm happy about that but the problems are : I am using my own library prefix - jgwm. Unfortunately build-guile-gtk does the following : 1. puts a call to sgtk_init_jgwm_defs in my guile-jgwm.c file with no corresponding extern declaration (the function is in jgwm-glue.c 2. puts a call to sgtk_register_type_infos(type_infos) in this function without defining the argument or the function 3 By adding the extern and commenting out the function call I can get the library built but when I try to use gtk fn-ality after using my module I get the following : guile> (use-modules (toolkits jgwm)) adding missing type `GdkOverlapType'. adding missing type `GdkWMDecoration'. adding missing type `GdkWMFunction'. adding missing type `GdkGC'. adding missing type `GtkOrientation'. adding missing type `GtkToolbarStyle'. adding missing type `GtkToolbarChildType'. adding missing type `GtkButtonBoxStyle'. adding missing type `GtkTreeViewMode'. adding missing type `GtkSpinButtonUpdatePolicy'. adding missing type `GtkCellType'. guile> gtk-window-new ERROR: In expression gtk-window-new: ERROR: Unbound variable: gtk-window-new ABORT: (misc-error) Type "(backtrace)" to get more information. I have a file called jgwm.scm which contains the following : (define-module (toolkits jgwm) :use-module (toolkits gtk)) ;; Merge the C stubs from their own module (define (merge-exports module interface) (let ((mod-i (module-public-interface module))) (module-for-each (lambda (sym var) (module-add! mod-i sym var)) interface))) (merge-exports (current-module) (or (resolve-interface '(toolkits jgwmstubs)) (error "jgwmstubs module not found"))) This is all copied from guile-gtk It seems that none of the gtk module stuff is registered - although it has been loaded and something was called to generate all the messages at the beginning. Just loading the gtk module in a fresh image is OK : guile> (use-modules (toolkits gtk)) adding missing type `GdkOverlapType'. adding missing type `GdkWMDecoration'. adding missing type `GdkWMFunction'. adding missing type `GdkGC'. adding missing type `GtkOrientation'. adding missing type `GtkToolbarStyle'. adding missing type `GtkToolbarChildType'. adding missing type `GtkButtonBoxStyle'. adding missing type `GtkTreeViewMode'. adding missing type `GtkSpinButtonUpdatePolicy'. adding missing type `GtkCellType'. guile> gtk-window-new #<primitive-procedure gtk-window-new> Any ideas what is going on ? Any help would really be appreciated - I am so close now I can almost touch it - but I have gone as far as I can without more help. Thanks for your time, Jules