Hi Mark,

On Tue, 6 Mar 2012 16:57:11 +0000 Mark Carter <mcar...@markcarter.me.uk> wrote:

> I'm a bit confused about how to create extensions. I have the following 
> files in an mccsl directory:
>
> mccsl.setup:
> (compile -s mccsl.scm)
> (install-extension 'mccsl "mccsl.so")
>
>  mccsl.scm:
> (module 
>  mccsl ( define-simple-syntax)
>  (import scheme)
>  ... ;; lots of definitions
> )
>
>
> I have managed to load and use the library using csi, but creating a 
> proper extension seems to not work.
>
> For starters, there is no exe named chicken-setup in Debian, although 
> there is a chicken-install. The following wiki page suggests that there 
> should be:
> http://wiki.call-cc.org/man/3/chicken-setup#install-program

The /3/ part in the path indicates that is the manual for CHICKEN 3.x.
chicken-setup is for CHICKEN 3.x only.  The tool to install eggs for
CHICKEN 4.x is chicken-install.

The documentation for the .setup things are here:
http://wiki.call-cc.org/man/4/Extensions (if you intend to use the
`make' macro, please, use the egg -- http://wiki.call-cc.org/egg/make --
since the core `make' macro is going to be deprecated).


>  If I type chicken mccsl.setup it creates an mccsl.c file, but not an
> mccsl.so file. I'm thinking that's wrong??

To test the installation of your egg, you can just execute
chicken-install in your egg directory.

If you want to perform some extra tests, you can use salmonella:

  $ chicken-install salmonella
  $ cd my-egg # directory where you put your egg code
  $ salmonella --this-egg
  
In case of errors, you may want to read the log file generated by
salmonella:

  $ salmonella-log-viewer salmonella.log


> So, there doesn't actually seem to be a way of installing a home-
> brewed extension. chicken-setup doesn't exists, and the install-
> extension function doesn't seem to install the extension. Presumably 
> I'm making some schoolboy errors. 

Maybe this document can be useful:
http://wiki.call-cc.org/eggs%20tutorial


Best wishes.
Mario
-- 
http://parenteses.org/mario

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to