guile-user
[Top][All Lists]
Advanced

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

Re: FFI bindings for FFTW


From: Daniel Llorens
Subject: Re: FFI bindings for FFTW
Date: Wed, 26 Feb 2014 18:25:22 +0100

On Feb 26, 2014, at 18:00, address@hidden wrote:

> Date: Tue, 25 Feb 2014 17:10:31 +0000
> From: Neil Jerram <address@hidden>
> To: address@hidden
> Subject: Re: FFI bindings for FFTW

[...]

>> This is my first time using the FFI. There are some portability issues
>> such as the lack of library path setting or the types (e.g. int ->
>> int32) being hardcoded. Any solution to these that's simpler than
>> autoconf?
> 
> Not sure I understand those problems.  Can you elaborate?

int/int32 was an error of mine, I didn't see that there was a foreign type 
'int'.

The problem with the library path is when the target of the dynamic-link isn't 
in the system library path. One can do 

LIBPATH=... guile ...

but this can be too broad. Would it be bad to try to find the library path in 
the module itself with pkgconfig, specific env variable, or some other way? 


> Just one suggestion; I would write the NAME in
> 
>   (define NAME (pointer->procedure RET (dynamic-func "CNAME" LIB) ...))
> 
> to be exactly the same as CNAME, and specifically with underscores 
> instead
> of hyphens, because I find that a useful reminder that I still need
> xxx->pointer conversion for some of its arguments.

Make sense, I've done this.

Thanks,

        Daniel




reply via email to

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