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: jo
Subject: Re: [Chicken-users] cross compiled hellow world says: Error: call of non-procedure: #<unbound value>
Date: Fri, 1 Apr 2016 14:38:05 +0000 (UTC)

indeed  that fixed it ! 

in the mean time I had found Re: [Chicken-users] csc doesn't like functions with :'s, csi doesn't car but didnt quite get it...

so next project would then be to cross compile eggs ...






From: Peter Bex <address@hidden>
To: jo <address@hidden>
Cc: "address@hidden" <address@hidden>
Sent: Friday, April 1, 2016 4:02 PM
Subject: Re: [Chicken-users] cross compiled hellow world says: Error: call of non-procedure: #<unbound value>

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


reply via email to

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