[cl-gd-devel] Loading Images from Pointers

Hans Hübner hans.huebner at gmail.com
Wed May 19 14:26:10 UTC 2010


Christoph,

can you please post some code that would allow me to try to reproduce
and diagnose the problem in isolation?  Make it a single lisp file
that assumes cl-gd being loaded, attach it to the message that you
send.

Thanks.
Hans

On Wed, May 19, 2010 at 16:18, Christoph Senjak
<christoph.senjak at googlemail.com> wrote:
>> I now understand what you're trying to do.  Here is my take on it:
>>
>> - Accessing a byte vector as C vector is compiler specific.  A
>> portable solution would allocate some memory using UFFI's interface to
>> malloc, copy the data to that memory buffer using a lisp loop and
>> memory accessor functions, call the required gdCreate* function and
>> finally free the malloced buffer.
>
> cffi:foreign-alloc seems to have an argument :initial-contents,
> according to what lispbuilder-sdl does. So there should be no need to
> perform this loop by hand.
>
> The main problem I have now is that I get strange error messages about
> "unknown alien functions" when trying to use def-function (which I
> found in gd-uffi.lisp). The function is definitely there, but seems
> like uffi cannot find it or something (I am not familiar with uffi).
>
> _______________________________________________
> cl-gd-devel site list
> cl-gd-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/cl-gd-devel




More information about the Cl-gd-devel mailing list