I'm working on a chicken library that I use in a C project. When I try to load eggs (e.g. (use intarweb)
), the runtime complains about failing to load the egg.
(lldb) run
Error: (require) cannot load extension: intarweb
Call history:
bridge-connector.scm:6: ##sys#require <--
Process 56172 exited with status = 70 (0x00000046)
I wondered whether the runtime failed to locate where the eggs are installed, so I tried setting CHICKEN_INCLUDE_PATH
environment variable with no success:
export CHICKEN_INCLUDE_PATH="/usr/local/Cellar/chicken/4.13.0/lib/chicken/8/"
I even tried using load
directly with the full path:
(load "/usr/local/Cellar/chicken/4.13.0/lib/chicken/8/intarweb.so")
but got the following error:
(lldb) run
Error: unbound variable: |\xcf\xfa\xed\xfe\x07\x00\x00\x01\x03\x00\x00\x00\x08\x00\x00\x00|
Call history:
bridge-connector.scm:6: load
I'm using Chicken Scheme 4 and I'm initializing the Chicken Scheme runtime as follow:
#include <chicken.h>
void my_lib_initialize()
{
C_word k = CHICKEN_run(C_toplevel);
(void)k;
}
My Chicken library is built as follow:
csc -embedded -debug-info -d3 -J -c bridge-connector.scm
csc -embedded -debug-info -d3 -c my-lib.scm
csc -c my_lib_initialize.c
csc ./my_lib_initialize.o ./my-lib.o ./bridge-connector.o -shared -embedded -static -debug-info -d3 -o libmy-lib.dylib