chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] lazy-ffi: what am I missing?


From: Mario Domenech Goulart
Subject: Re: [Chicken-users] lazy-ffi: what am I missing?
Date: Wed, 31 Mar 2010 13:46:13 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hi Jeronimo

On Tue, 30 Mar 2010 23:06:29 -0300 Jeronimo Pellegrini <address@hidden> wrote:

> I am trying to get this example from the lazy-ffi documentation
> working, but I don't know what I'm doing wrong...
>
> This is the code:
>
> thing.scm
> /---
> (use lazy-ffi)
> (use numbers)
>
> #~"libc.so.6" 
> (#~printf "%d -> %g, ok: %s\n" 123 45.67 "hello")
>
> #~"libm.so.6"
>
> (print (#~sin 33.4 return: double:)   )
> (print (#~tolower #\A return: char:) )
>
> (let* ([box (f64vector 0)]
>        [r (#~modf 123.456 box return: double:)] )
>   (print (list r box) )  )
> \---
>
> It compiles but doesn't work when doubles are used:
>
> $ csc -X lazy-ffi.scm thing.scm
>
> (Do I really need to include the lazy-ffi source when compiling?)
>
> $ ./thing
>
> 123 -> 45.67, ok: hello
>
> Error: unbound variable: ##sys#cons-flonum

I think it's a lazy-ffi bug.  ##sys#cons-flonum doesn't exist anymore in
the Chicken core since 4.3.something.


> I have tried downloading the libffi-2.tgz mentioned at 
> http://chicken.wiki.br/eggref/4/lazy-ffi but got a 404.

The link should point to
http://www.call-with-current-continuation.org/tarballs/libffi-3.tgz

I have fixed the wiki page.

Would you please fill a ticket regarding to this problem?

Thanks for catching and reporting it.

Best wishes.
Mario





reply via email to

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