i said that i would post this by the end of the week. well, its 11 p.m.
on friday night, and here is the code.
Sounds like my usual working schedule :)
it's only marginally working, but the guts are there. also no makefile
is included. all you get is gd_glue.c, gd-demo.scm, and guile-ext.c (to
build an extended interpreter). much of the code in gd_glue.c is
generated (using guile).
Works fine for me :)
OK... here is the Makefile I just wrote while I was playing with this. I
have no idea if this will work for anyone else. I know SFA about guile,
scheme, etc so don't be surprised if it breaks. (Actually, there are almost
no docs on any of this. I just read the libguile makefile and guile-snarf to
work this out, so it could be wrong).
This has tabs in it which make requires so be careful if you cut and paste.
-Chris
P.S. Anyone working on separating the goonix stuff from libguile?
---------------snip-snip-snip-----------------
# set this to where you gd library is if its not installed....
GDLOCATION=$(HOME)/misc/gd1.2/
CFLAGS+=-I$(GDLOCATION)
all : guile-ext test
test : test.gif
test.gif : gd-demo.scm
guile-ext -s gd-demo.scm
clean :
rm -f *.o *.x *~ test.gif guile-ext
guile-ext : guile-ext.o gd_glue.o
gcc -o guile-ext -L$(GDLOCATION) gd_glue.o guile-ext.o -lgd -lguile -lqt
gd_glue.o : gd_glue.x gd_glue.c
gd_glue.x : gd_glue.c
guile-snarf -I$(GDLOCATION) gd_glue.c > gd_glue.x