retroforth/ffi-testing
crc c478882b7f ffi is working now
FossilOrigin-Name: b05ebe6fe6f6c78682289eda20878891671974598be6027e25a1a10a6420edfe
2022-02-15 14:40:15 +00:00
..
ffi.retro ffi is working now 2022-02-15 14:40:15 +00:00
README.txt ffi is working now 2022-02-15 14:40:15 +00:00
retroforth.h ffi is working now 2022-02-15 14:40:15 +00:00
test.c ffi is working now 2022-02-15 14:40:15 +00:00

You will need to compile the C source to a shared object. Pass
the same compiler flags as used when building the VM.

E.g.,

    cc -DFAST   -DENABLE_FLOATS -DENABLE_FILES -DENABLE_UNIX \
       -DENABLE_RNG -DENABLE_CLOCK -DENABLE_SCRIPTING \
       -DENABLE_SIGNALS -DENABLE_MULTICORE -DENABLE_FFI \
       -DENABLE_UNSIGNED -O2 \
       -shared test.c -o test.so

Then run the test sample:

    ../bin/retro ffi.retro