[Top][All Lists]

[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: Mon, 5 Dec 2011 18:23:25 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

* Watson Ladd <address@hidden> [111205 18:04]:
> On Mon, Dec 5, 2011 at 9:22 AM, Mario Domenech Goulart
> <address@hidden> wrote:
> > Hi Watson,
> >
> > On Mon, 5 Dec 2011 08:52:06 -0600 Watson Ladd <address@hidden> wrote:
> >
> >> csi has it for making scripts run. This could simply be a case of me
> >> assuming that the interpreter and compiler took similar options, which
> >> is likely. So now i see what happens: csc takes the -ss switch and
> >> interprets it as -s, which causes the result.
> >>
> >> So what is the correct way to compile an SRFI-22 compliant script to
> >> an executable?
> >
> > I'm not sure I understand your question.  Usually it's just a matter of
> >
> >    $ csc your-program.scm
> >
> > A binary executable file called `your-program' will be generated.
> So that works: I get an executable. But the executable does nothing
> but take up time when run. I've got a SRFI-22 compliant script: that
> is I want the executable to evaluate (main argslist) where argslist is
> a list containing strings corresponding to the entries of the argv
> vector. The interpreter has a flag for this: the compiler doesn't seem
> to. Do I need to put in a toplevel expression, and if so, which one?
> Thanks for taking the time to answer my questions: I'm reasonably
> experienced with scheme, but recently needed to turn some scheme into
> something that can run on systems with only a C compiler.

Calling (main (argv)) should help. argv is similar to C's argument
list, it includes the program's name etc...

If you get stuck again, please show us some code. It is always
easier to talk about code...  It can be pasted here:



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]