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: Alex Shinn
Subject: Re: [Chicken-users] Bugs in documentation and Mac OS X 10.6.8 executable generation broken
Date: Tue, 6 Dec 2011 08:49:04 +0900

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.

-- 
Alex



reply via email to

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