I figured it out:
https://github.com/gambit/gambit/issues/955#issuecomment-4138996172

On Thu, Mar 26, 2026 at 12:29 PM Nathan Thern <nthern@gmail.com> wrote:
I am able to compile an R7RS library and main program into a single executable using the method described here:

What I would like to do is compile my libraries into shared objects (.so files maybe?) so I can have multiple programs that each load the compiled library. Marc Feeley says it can be done here:
but I can't get his command to work.

regards,
NT