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

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to