| 1 |
#include <stdio.h> |
| 2 |
#include <ecl/ecl.h> |
| 3 |
|
| 4 |
int main (int argc, char **argv) { |
| 5 |
|
| 6 |
cl_boot(argc, argv); |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
extern void init_lib_HELLO_LISP(cl_object); |
| 13 |
ecl_init_module(NULL, init_lib_HELLO_LISP); |
| 14 |
|
| 15 |
cl_object result = cl_eval(c_string_to_object("(hello-lisp)")); |
| 16 |
ecl_print(result, ECL_T); |
| 17 |
|
| 18 |
cl_object my_fun = cl_eval(c_string_to_object("(lambda (x) (1+ x))")); |
| 19 |
ecl_print(my_fun, ECL_T); |
| 20 |
|
| 21 |
result=cl_funcall(2, my_fun, ecl_make_fixnum(8)); |
| 22 |
ecl_print(result, ECL_T); |
| 23 |
|
| 24 |
ecl_terpri(ECL_T); |
| 25 |
|
| 26 |
cl_shutdown(); |
| 27 |
return 0; |
| 28 |
} |