Has anyone had experience embedding SBCL in a C++ app? The C++ app has the main(), and I would like to be able to start up or embed SBCL in the C++ app without the use of pipes or other funky cross process mechanisms. I'm looking for a static or DLL link of SBCL into my game. For reference, here's how I am currently using Corman CL:

1) C++ .exe starts up2) App calls LoadModule("lisp-file-compiled-into-dll.dll")3) That dll implicitly loads CormanLispServer.dll (The corman runtime engine)4) There is also a .img file that contains all the startup heap stuff, and I think that it also is implicitly loaded in step #3.

I am having trouble locating a tutorial on how to embed sbcl in another app directly. Your helpful suggestions are much appreciated!

As far as I am aware, this is outright impossible, because SBCL memory model has to many assumptions about owning the process or somesuch... But I never looked into SBCL internals. Still, I have never seen any mention of that, and usually for embedding an open-source Lisp ECL is recommended.

The C++ to lisp calls are only for events in an event driven paradigm. So the alternative would be for the C++ to queue up events and the Lisp to poll the events instead of the C++ calling lisp directly when events are generated.

If anyone has a guide for how to do this, I'd still appreciate it. The C++ app uses a sample framework that comes with the 3d graphics engine, and I really don't feel like opening that can of worms. It seems like it should be easier to compile sbcl as a dll than to manually dig around for everything that the sample framework is doing.