[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] some questions about easyffi and foreign code
From: |
Hugo Arregui |
Subject: |
Re: [Chicken-users] some questions about easyffi and foreign code |
Date: |
Sat, 2 Feb 2013 21:52:54 -0300 |
Hi again,
> 1) ..
> $ csc -X easyffi test.scm -c++; ./test
>
> Error: unbound variable: foreign-parse
> Call history:
> foreign-parse
>
> I have no idea of what's going on.
Could this be a problem in my installation?
The example in the wiki is not working either:
#>!
#ifndef CHICKEN
#include <math.h>
#endif
double modf(double x, ___out double *iptr);
<#
(let-values ([(frac int) (modf 33.44)])
(print frac " " int))
//with the same error: "unbound variable: foreign-parse"
> 2) Then I tried another approach:
>..
> Error: bad argument type - not a pointer: 0
I found a way to do this[1]. But, I found another problem: big int32
are promoted to flonums, I know that this is an expected behaviour,
but I have a doubt:
In a message[2] Kon Lovett writes:
"Means you want to compile w/ generic-arithmetic & usual-integrations
when using a foreign call."
I suposse this is a compiler setting, but I don't now how to enable
it. Also, I don't know what "usual-integrations" means, could you
provide more details please?
Thanks again, and sorry for bothering you.
Regards,
Hugo
[1] http://pastebin.com/XH5n3V72
[2] http://lists.nongnu.org/archive/html/chicken-users/2007-05/msg00227.html