Testing ECL (Embeddable Common Lisp)
ecl > (compile-file "hello.lisp" :system-p t)
ecl > (compile-file "bye.lisp" :system-p t)
(c:build-static-library "hello-bye" :lisp-files '("hello.o" "bye.o")
:init-name "init_hello_bye")
init_hello_bye is referenced in C source.
cl_object result = cl_eval(c_string_to_object("(hello)"));
ecl_print(result, ECL_T);
ecl_terpri(ECL_T);
This source begin in:
cl_boot(argc, argv);
and end in:
cl_shutdown();
wget -c https://common-lisp.net/project/ecl/static/files/release/ecl-20.4.24.tgz in /usr/local/src
tar -xf ecl-20.4.24.tgz
cd ecl-20.4.24/
./configure --prefix=/usr/local
make
make install
cc -o hello hello-bye.c libhello-bye.a -lecl
./hello
Hello, world
"Bye."
In this function return a "hello, world" but using princ
In this function return a "Bye." but using print.