Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <libguile.h>
- SCM test_func(SCM width, SCM height) {
- return ( scm_from_int( scm_to_int(width) * scm_to_int(height) ) );
- }
- int main(int argc, char *argv[]) {
- SCM func;
- scm_init_guile();
- scm_c_define_gsubr("test_func", 1, 0, 0, test_func);
- scm_c_primitive_load("script.scm");
- func = scm_variable_ref(scm_c_lookup("simple-func"));
- scm_call_0(func);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement