From: Surendra S. <efu...@ne...> - 2005-06-29 07:11:36
|
"Hoehle, Joerg-Cyril" <Joe...@t-...> writes: > Hi, > >> (def-c-var gdMaxColors (:type int)) >>But it seems I have to refer to the dll somehow while creating this variable. > a) Indeed, you need to add (:library "gd...dll") here. Thanks. > > b) "Incomplete FFI type INT is not allowed here." > Did you get past that error? It looks like a package problem. > Maybe (not (eq 'int 'ffi:int)) ? > The above error is equal to "unknown FFI type `INT'", which is surprising, > since the FFI knows about ffi:int. Yes, I did. I think it was throwing a wrong error. > > Since you're trying and using GD, do you know about Carlos Ungil's port of cl-gd to CLISP (i.e. using the CLISP FFI instead of UFFI)? (I've never tried it myself, so I don't know whether this only works on UNIX). > Thanks. The reason why I am doing this is because I want to learn how to use ffi, also his port doesn't contains the functions which I want. >> (:return-type (ffi:c-ptr gdImage)) > This is likely wrong. Please use either (c-pointer gdImage) or c-pointer. It's unlikely that you want to convert the foreign pointer to a Lisp structure, which is what C-PTR does. I'd bet you need to keep the original pointer, so as to be able to pass this handle (aka. proxy or reference) to other gd functions. The problem here is that I am using clisp 2.33.1 and it does not have c-pointer, I don't think that even 2.33.2 does. I would like to use a much more current version of clisp but I don't have VC++ to compile it (and believe me there beta version which they give for free, is the worst IDE/compiler, half of the things do not work, installation takes huge amount of time, I could not find assembler). Also, is there any tool utility which can show me the mangled names in the dll? -- Surendra Singhi http://www.public.asu.edu/~sksinghi/index.htm Great wits are sure to madness near allied, And thin partitions do their bounds divide. (John Dryden, Absalom and Achitophel, 1681) |