Compiling DLLs - but still use Ruby?

I have a Windows software program that I use frequently which can talk
to dll files. We have successfully written code in C++, then compiled
them into dlls and used them in this software.

It would be nice to start writing our programs in Ruby but I can’t think
of a way to get that nice Ruby code into a compatible dll. Maybe I could
wrap the Ruby up in some C++ code that can then be compiled…? I found
this site: but I don’t
think it can be used to create DLLs. Thank you very much for any ideas
or pointers.

Keep in mind: I’m a newbie.

You can embed a Ruby interpreter or simply Ruby code in your C++ code.
You can find tons of references online about how embedding Ruby works.

A brief example is shown in the “Extending Ruby” section of this book by
Dave T.: