You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to build chibi-scheme as a static library to be used as a scripting language in an application. I looked into the manual, but all I could find were instructions to build the command-line repl statically, not libchibi-scheme itself.
Looking into the Makefile, I was able to compile the library statically with the following parameters (CMake):
Using the generated libchibi-scheme.a and the sexp.h/eval.h headers worked correctly, and I was able to generate an executable that evaluated a .scm file. However, importing SRFIs does not work correctly. For instance, in the following sample program that reads a file defining a function and calls that function from C++:
SRFI-27 is one of the SRFIs included in clibs.c, so I was under the impression that I would be able to import and use it, even without having to build it as a dynamic module. Is there a proper way to embed chibi-scheme statically into a program, while still getting access to some of the implemented SRFIs? My main objective is to avoid needing to install chibi-scheme or distribute the shared library together with the executable.
The text was updated successfully, but these errors were encountered:
Hi, I've been able to do this by copying the lib/ folder into the same directory as the program is being executed (I've also checked if it actually statically linked it with ldd and verified that no libchibi-scheme was there.), also your program doesn't actually run without the substitution s/(random-integer 10)/(number->string &)/.
I'd like to build chibi-scheme as a static library to be used as a scripting language in an application. I looked into the manual, but all I could find were instructions to build the command-line repl statically, not libchibi-scheme itself.
Looking into the Makefile, I was able to compile the library statically with the following parameters (CMake):
Using the generated libchibi-scheme.a and the sexp.h/eval.h headers worked correctly, and I was able to generate an executable that evaluated a .scm file. However, importing SRFIs does not work correctly. For instance, in the following sample program that reads a file defining a function and calls that function from C++:
main.cpp:
test1.scm:
I get the following output:
SRFI-27 is one of the SRFIs included in clibs.c, so I was under the impression that I would be able to import and use it, even without having to build it as a dynamic module. Is there a proper way to embed chibi-scheme statically into a program, while still getting access to some of the implemented SRFIs? My main objective is to avoid needing to install chibi-scheme or distribute the shared library together with the executable.
The text was updated successfully, but these errors were encountered: