chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] cross compiled hellow world says: Error: call of non


From: Peter Bex
Subject: Re: [Chicken-users] cross compiled hellow world says: Error: call of non-procedure: #<unbound value>
Date: Fri, 1 Apr 2016 16:02:47 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Apr 01, 2016 at 01:49:35PM +0000, jo wrote:
> Hi
> 
> This time I followed the instructions on 
> http://wiki.call-cc.org/man/4/Cross%20development to build a cross compiler 
> for powerpc. 
> 
> After the build I copied the target tree to the device.
> I compiled following test program:
>  cat hello.scm
> (define (hello who)
>   (format #t "~A ~A!\n"
>           "Hello" who))
> (hello "Wisp")
> 
> Howver on target I get this error?:
> 
> target:/tmp# ./hello
> 
> Error: call of non-procedure: #<unbound value>
> 
>         Call history:
> 
>         hello.scm:4: hello
>         hello.scm:2: format             <--
> 
> What does this mean ? Any ideas on how to proceed?

Hello again,

This is probably because you didn't load the module or unit that
defines format (this is the "extras" module).  The interpreter has
a few units available implicitly by default which aren't loaded
into compiled code.

This is a bit of a gotcha, which is why we're working on making this
more consistent in CHICKEN 5.

Anyway, if you put your code in a module the compiler would give
an error about a missing import.  The fix is to put this at the top
of your file:

(use extras)

This isn't a cross-compilation issue by the way, this would also
give an error if you compile and run on the host platform.

Hope this helps!
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

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