[gambit-list] Gambit and GUI (GTK+)

Alex Queiroz asandroq at gmail.com
Thu Mar 31 12:07:01 EDT 2011


Hallo,

On Thu, Mar 31, 2011 at 12:06 PM, Diogo F. S. Ramos <diogofsr at gmail.com> wrote:
>
> AFAICS it generates bindings from the C functions directly to gambit and
> creates a loadable object. It is really nice and it is very different
> from what I was trying to do.
>
> What I had in mind was using a main C program for the GUI and to use
> gambit like an extension. Just like the server/client example,
> actually. Although I must say that I didn't went too far as I keep
> getting a 'undefined reference to `____20_server__'' linker error. And I
> didn't quite find a place where it's describe what functions have to be
> called to initiate the gambit library.
>

     You can approach the problem either by embedding or extending
Gambit-C. The embedding case will give you a program in less time
because you won't need to write bindings to GTK+. On the other hand,
once the bindings are written, you can reuse them in several different
projects.

> I also tried to create a shared library and link it against an ordinary
> C program but I kept getting seg faults. I guess I need to initiate the
> gambit library from the C program.
>

     When embedding Gambit-C you have to initialise it before calling
any Scheme functions with ___setup().

-- 
-alex
http://www.artisancoder.com/



More information about the Gambit-list mailing list