[gambit-list] Creating dynamically-loadable libraries

Marc Feeley feeley at iro.umontreal.ca
Wed Mar 6 08:40:09 EST 2019


Have you looked at the files client.c, server.h and server.scm in the tests directory?

You can embed Gambit in this way and then from C do:

   eval_string("(load \"lib.o1\")");

Marc



> On Mar 3, 2019, at 10:06 AM, mikel evins <mevins at me.com> wrote:
> 
> The Gambit docs shows examples of building dynamically-loadable libraries to be loaded by Gambit code, and also how to compile shared libraries.
> 
> Does anyone have a handy example of compiling a dynamically-loadable library for loading by non-Gambit code, including how to initialize the gambit runtime when the library is loaded? I'd like to compile some of my Gambit code to a library that can be dynamically loaded by a Lispworks app, but frobbing around with compiler flags has yielded no joy so far. 
> 
> I don't think I need to see an example of doing it from Lispworks; if anyone has, say, a C program that can dynamically load a Gambit library and initialize it properly, that's probably all I need.
> 
> Thanks in advance to anyone who can help.
> 
> --me
> 
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca
> https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list




More information about the Gambit-list mailing list