chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] compiled program with macros raises unbound-variable


From: foobar
Subject: Re: [Chicken-users] compiled program with macros raises unbound-variable error
Date: Thu, 08 Mar 2007 12:26:33 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070103)

felix winkelmann schrieb:
> On 3/8/07, foobar <address@hidden> wrote:
>> Hi list,
>>
>> i've tried to compile a file that uses some macros defined with
>> syntax-rules.
>> I compiled it using: csc -R tinyclos foo.scm
>> So nothing special sofar.
>> The file compiles without warnings or errors.
>>
>> Another file compiled to a shared-library
>> using csc -s cps.scm.
>> This file requires the macros via
>> (require 'cps-syntax).
>
> Is cps-syntax a  source file containing macros? 
yes.
> Then you have to
> make those macros available at _compile-time_, or the
> compiler will not see them. "(require ...)" loads code at run-time,
> not at compile-time. Try "require-for-syntax".
I tried it and it worked :) Thanks very much.
I didn't know that there is a special syntax for such things.
I tried it using csc -run-time-macros but that didn't work
either.
I'll consult the manual for the various forms to require files.

greets
certainty






reply via email to

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