[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiling to C w/ eggs
From: |
xash |
Subject: |
Compiling to C w/ eggs |
Date: |
Tue, 23 Mar 2021 15:22:41 +0100 |
Hey,
I'm trying to compile a small project with some imports (some srfi,
matchable, and ncurses) to a bunch of *.{c,h} files for easier
distribution. Following http://wiki.call-cc.org/man/5/Deployment
compiling the example to a test.c went smooth. However, I'm already
stuck with
; test.scm
(import (srfi-1))
(print "Hello, World!")
> chicken-csc -t test.scm
> gcc -Os -fomit-frame-pointer -DHAVE_CHICKEN_CONFIG_H test.c \
build-version.c eval.c expand.c internal.c library.c modules.c \
runtime.c chicken-syntax.c -o main -lm
> ./main
Error: (require) cannot load extension: srfi-1
Not very surprising. I tried some of the compiler options -uses srfi-1,
-emit-all-import-libraries, -unit, …, but to no avail. I guess I could
compile chicken-install/srfi-1/* to .c/.h files (after I figure out how
exactly), and bundle them together. But with ~15 modules this seems
quite tedious for something that should be able to be done automatically,
at least for the modules without FFI. Is there an easier way?
Thank you.
- Compiling to C w/ eggs,
xash <=