This "hello world" exercise is a modified version of the embed example from the ecl repository.
The exercise demonstrates:
- writing an ECL program (lprog) which uses FFI to access a constant defined in a C header file
- compiling lprog using ecl
- writing a C program (cprog) which calls function provided by lprog
- compiling a C program (cprog) which links lprog
- clone the ecl repository
- install ecl from your distribution's package manager (YMMV; I can confirm that this example works on Debian 11.5 using ECL 20.4.24) or from source
- run
make
from this repository's root - you should now have and executable which can be run using:
./ecl-hello-r-lisp