chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Bugs in documentation and Mac OS X 10.6.8 executable


From: Christian Kellermann
Subject: Re: [Chicken-users] Bugs in documentation and Mac OS X 10.6.8 executable generation broken
Date: Tue, 6 Dec 2011 08:52:55 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

* Alex Shinn <address@hidden> [111206 02:40]:
> On Tue, Dec 6, 2011 at 4:05 AM, Christian Kellermann
> <address@hidden> wrote:
> > Watson,
> >
> > * Mario Domenech Goulart <address@hidden> [111205 18:27]:
> >> >>> So what is the correct way to compile an SRFI-22 compliant script to
> >> >>> an executable?
> >
> >> Maybe you are assuming a `main' procedure would be automatically called
> >> when you run your compiled code?  If so, that's not going to happen, and
> >> AFAIK, there's no compiler option to do that.  You can just explicitly
> >> call your `main' procedure and run your scripts with csi -s" instead of
> >> "csi -ss".  The compiled code would just work this way.
> >
> > Out of curiousity: Did you just assume that chicken supports srfi-22?
> > If you got the idea by reading some of chicken's docs then this is
> > a bug and we need to clarify these bits, so the next person will
> > not be led astray.
> 
> csi does support SRFI-22 via the -ss option - it's basically
> the same as -s plus calling (main (command-line-arguments))
> at the end.
> 
> For csc you can either use
> 
>   csc -postlogue '(main (command-line-arguments))' foo.scm
> 
> or add to the end of foo.scm:
> 
>   (cond-expand
>     ((and chicken compiling) (main (command-line-arguments)))
>     (else #f))
> 
> so that it supports SRFI-22 both interpreted and compiled
> (untested).
> 
> Or you could just give up on SRFI-22 and use csi -s.

Thanks Alex for enlightening me.

Kind regards,

Christian

-- 
Who can (make) the muddy water (clear)? Let it be still, and it will
gradually become clear. Who can secure the condition of rest? Let
movement go on, and the condition of rest will gradually arise.
 -- Lao Tse. 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]