[Openmcl-devel] Gtk "Hello, world" example in OpenMCL

Rick Taube taube at uiuc.edu
Mon Aug 9 06:22:57 PDT 2004


>> why not use ccl/library/openmcl-gtk-support.lisp??  this give you a 
>> gtk-init and makes gtk-main unnecessary. its a trivial fix to get it 
>> working on darwin.
>
> Is this actually true?

I am using Gtk+2 on Darwin in OpenMCL. I made only one small change to 
my openmcl-gtk-support.lisp to get it working with my GTK2 libs on 
Darwin:

#+darwin
(open-shared-library "/sw/lib/libgtk-x11-2.0.dylib"))
#-darwin
(dolist (lib '("libgdk.so" "libgtk.so"))
   (open-shared-library lib))

> When I last looked, I thought that the gtk support in openmcl was Gtk 
> 1.X and PPC Linux only.  It never actually ran for Gtk 2.X or for any 
> flavor of OS X.

Of course, my OpenMCL :GTK interface directory is not the same as that 
shipped with Openmcl's linux headers! I made my own .cbb files by first 
installing all GTK+2 libs and headers via Fink and then using FFIGEN to 
generate my own .cdb database for darwin/gtk2. I  then wrote a program 
that uses the "gtk.ffi" file output by FFIGEN to automatically generate 
many lisp wrapper functions that implement a (slightly) higher 
interface to GTK then the raw #_ traps that openmcl provides. the 
reason I am using this layer this is that i also want to provide a gtk2 
interface for SBCL on Linux.  Last week I was able to generate a 
correct ffi flle for SBCL. I m not sure yet what to do about gtk-main 
in sbcl, i really prefer the flexibility that the openmcl event 
dispatching hack provides.




More information about the Openmcl-devel mailing list