Welcome to the CHICKEN Scheme pasting service
importing module from csi part 1 pasted by arclite on Sat Feb 18 06:26:41 2017
# this demonstrates successful loading of a module # when using csi in the module's directory ls amodule.import.scm amodule.scm amodule.so /tmp/Chicken/lib$ /tmp/Chicken/lib$ cat amodule.scm (module amodule (afunc) (import chicken scheme) (define (afunc x) (* x x))) /tmp/Chicken/lib$ /tmp/Chicken/lib$ csi CHICKEN (c) 2008-2016, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann Version 4.11.0 (rev ce980c4) linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ] compiled 2016-05-28 on yves.more-magic.net (Linux) #;1> (use amodule) ; loading ./amodule.import.scm ... ; loading /usr/local/lib/chicken/8/chicken.import.so ... ; loading ./amodule.so ... #;2> (afunc 2) 4 #;3>
Including file added by arthurmaciel on Sat Feb 18 06:29:56 2017
/tmp/Chicken/lib$ cat amodule.scm (module amodule (afunc) (import chicken scheme) (define (afunc x) (* x x))) /tmp/Chicken/lib$ /tmp/Chicken/lib$ csi CHICKEN (c) 2008-2016, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann Version 4.11.0 (rev ce980c4) linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ] compiled 2016-05-28 on yves.more-magic.net (Linux) #;1> (include "your-path/amodule.scm") #;2> (import amodule) #;3> (afunc 2) 4 #;4>