Hi Shaun, On Wed, 30 Mar 2011 16:46:33 -0500 Shaun Bruner <[email protected]> wrote:
> I've only recently begun to play with Chicken's module system, and am having a > bit of trouble figuring out how to use csc against compiled modules. I'm > hoping > someone on this list can show me the error of my ways. One thing that trips me > up is that what I'm trying works while using csi. Here's a small hello world > example I've written to illustrate. > > ;; hello.scm > > (declare (unit hello)) ; tried both with and without this line > > (module hello > (say-hello-to) > (import scheme chicken) > > (define (say-hello-to name) > (string-append "Hello, " name))) > > ;; main.scm > > (load "hello") > (import (prefix hello h:)) > > (define (do-test) > (display (h:say-hello-to "you!"))) > > (define (main) (do-test)) > > and from bash: > > $ csc -c hello.scm > $ csc -c main.scm > > Syntax error (import): cannot import from undefined module > > hello > > Expansion history: > > <syntax> (##core#begin (import (prefix hello h:))) > <syntax> (import (prefix hello h:)) <-- > > Error: shell command terminated with non-zero exit status 17920 > > > I'm pretty sure the problem is me, but I've reached that point where I'm > trying > the same 3 or 4 things and hitting the same walls. Any help setting me > straight > is much appreciated. I think all you need is -J, like $ csc -J hello.scm (I'm not sure if you really want -c) Best wishes. Mario -- http://parenteses.org/mario _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
