diff --git a/Doc/Manual/Chicken.html b/Doc/Manual/Chicken.html index 3c67611b9..463e829d4 100644 --- a/Doc/Manual/Chicken.html +++ b/Doc/Manual/Chicken.html @@ -24,13 +24,14 @@
- All the following examples assume that the module is named - 'example' and the following occurs when run: -
-- Substitute /usr/local/share/chicken as appropriate for - your platform. - - -% chicken-config -home -CHICKEN_HOME=/usr/local/share/chicken-
- We will assume your files are in a directory - /home/jonah/examples. Make a file as follows: -
-;; precsi.scm -(declare (unit precsi)) -(declare (uses example)) - -;; any other code you want run before the main interpreter is executed -- - Run SWIG on your interface file as usual, create the 2 wrapper - object files, and then either - -
-- or --% cd /usr/local/share/chicken -% chicken /usr/local/share/chicken/src/csi.scm -optimize-level 3 -quiet \ - -include-path /usr/local/share/chicken/src \ - -prologue /usr/local/share/chicken/src/build.scm \ - -prelude "(declare (uses posix precsi))" \ - -output-file /home/jonah/examples/csi-example.c -% cd /home/jonah/examples -% chicken precsi.scm -optimize-level 3 --explicit-use \ - -output-file precsi.c -% gcc precsi.c csi.c wrapper_object_files \ - `chicken-config -libs` `chicken-config -extra-libs` -o csi-example ---
-- - + The easiest way to use SWIG and CHICKEN is to use the csc compiler + wrapper provided by CHICKEN. Assume you have a SWIG interface file + in example.i and the C functions being wrapped are in example_impl.c. -% extend-csi precsi -output-file csi-example-
+ ++ $ swig -chicken example.i + $ csc -svk example.scm example_impl.c example_wrap.c + $ csi example.so test_script.scm +
+ You must be careful not to name the example_impl.c file example.c because + when compiling example.scm, csc compiles that into example.c! +
+ +Again, we can easily use csc to build a binary.
+ ++ ++ $ swig -chicken example.i + $ csc -vk example.scm example_impl.c example_wrap.c test_script.scm -o example + $ ./example +
@@ -488,7 +467,7 @@ CHICKEN_HOME=/usr/local/share/chicken
-@@ -521,7 +500,7 @@ CHICKEN_HOME=/usr/local/share/chicken type.
-