From brad.beveridge at gmail.com Sun Dec 4 06:58:02 2005 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Sat, 3 Dec 2005 22:58:02 -0800 Subject: [fetter-devel] Verrazano and ncurses Message-ID: Hi all. I've just tried Verrazano out by trying to generate bindings for ncurses - I know there is a cl-ncurses binding set already, but it appears to crash my SBCL 0,9,7 build - so I thought I'd give this Verrazano thing a try :) First of all, I'd just like to say that Verrazano is as easy to use as it is hard to spell :) Even a Lisp newbie like me (couple of months) could get it installed and generating bindings in an evening. So I ran Verrazano over the ncurses.h file, it generated a file quite happily, but has a bit of an issue loading the generated file. Here is my specific error... * (load "/home/brad/development/lisp/bindings/ncurses/ncurses-library.lisp") debugger invoked on a SB-KERNEL::DEFMACRO-LAMBDA-LIST-BROKEN-KEY-LIST-ERROR in thread #: error while parsing arguments to DESTRUCTURING-BIND: odd number of elements in keyword/value list: (0) Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [ABORT] Exit debugger, returning to top level. (CFFI::NOTICE-FOREIGN-STRUCT-DEFINITION -IO-FILE ((-FLAGS :INT) (-IO-READ-PTR :POINTER) (-IO-READ-END :POINTER) (-IO-READ-BASE :POINTER) (-IO-WRITE-BASE :POINTER) (-IO-WRITE-PTR :POINTER) (-IO-WRITE-END :POINTER) (-IO-BUF-BASE :POINTER) (-IO-BUF-END :POINTER) (-IO-SAVE-BASE :POINTER) (-IO-BACKUP-BASE :POINTER) (-IO-SAVE-END :POINTER) ...)) I am too much of a newbie to work this out by myself, but any help would be appreciated :) My system - GCC 4.0.2 - gccxml, cvs - cffi, latest luis - parse-number and s-xml - latest from Cliki Thanks Brad From rayiner at gmail.com Sun Dec 4 08:52:49 2005 From: rayiner at gmail.com (Rayiner Hashem) Date: Sun, 4 Dec 2005 03:52:49 -0500 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: > Verrazano thing a try :) First of all, I'd just like to say that > Verrazano is as easy to use as it is hard to spell :) Even a Lisp > newbie like me (couple of months) could get it installed and > generating bindings in an evening. Great. I'm glad you found it easy to use. > So I ran Verrazano over the ncurses.h file, it generated a file quite > happily, but has a bit of an issue loading the generated file. Here > is my specific error... > * (load "/home/brad/development/lisp/bindings/ncurses/ncurses-library.lisp") Okay, I've tracked down the problem, and fixed them in CVS. Actually, there were two. First, there was a change to CFFI-LUIS fairly recently which modified the syntax for declaring arrays inside structures. What used to be: char unused[43] -> (-unused :char 43) became: char unused[43] -> (-unused :char :count 43) I've modified Vzn to emit the new syntax. The other problem is the handling of wchar_t. Apparently, GCC-XML considers wchar_t to be a fundamental type. This sort of thing keeps popping up on occasion, because GCC-XML's idea of fundamental types is totally alien to ISO C++. This one is a bit hard to fix. There is no good translation from wchar_t to a CFFI type. I punted on it and translated it to :int, but this isn't a great solution --- wchar_t doesn't necessarily map to an int on all platforms. It does on most *NIX platforms, but I think it maps to a :short on Windows. I don't really know where the true fix to this should go. Should Vzn start having knowledge of platform-specific type sizes, or should CFFI abstract it like it does :int, etc? In any case, if you're on *NIX, this should work now. Please try again with the latest CVS copy. Sincerely, Rayiner Hashem From rayiner at gmail.com Mon Dec 5 02:07:35 2005 From: rayiner at gmail.com (Rayiner Hashem) Date: Sun, 4 Dec 2005 21:07:35 -0500 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: > Wow! That is an astoundingly good turn around time. LOL. > Error is: > ; file: /home/brad/development/lisp/packages/verrazano-support/support.lisp > ; in: DEFUN VTABLE-LOOKUP > ; ((NCURSES-LIBRARY::VPTR > ; (CFFI:MEM-REF NCURSES-LIBRARY::POBJ :POINTER NCURSES-LIBRARY::COFF))) > ; > ; caught COMMON-LISP:ERROR: > ; illegal function call > > ; (CFFI:MEM-AREF NCURSES-LIBRARY::VPTR > ; :POINTER > ; (NCURSES-LIBRARY::- NCURSES-LIBRARY::INDX 2)) > ; --> CFFI:MEM-REF CFFI-SYS:%MEM-REF SB-SYS:SAP-REF-SAP > ; ==> > ; NCURSES-LIBRARY::VPTR > ; > ; note: deleting unreachable code I'm unable to reproduce this error. It appears that your ncurses version has C++ code in it, while mine does not. Would you mind sending me a copy of your ncurses.h, along with the generated ncurses-library.lisp? PS> The CFFI array length syntax change also broke C++ support. That's been fixed in CVS now. Sincerely, Rayiner Hashem From brad.beveridge at gmail.com Mon Dec 5 02:22:35 2005 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Sun, 4 Dec 2005 18:22:35 -0800 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: I'm just using the standard GNU ncurses library, version 5.4-9Ubuntu, which I guess is pretty inline with Debian. There is a little __cplusplus define at the start, but nothing else that looks like C++ specific. Also - how do I pass a NULL pointer to a function? Many thanks Brad On 12/4/05, Rayiner Hashem wrote: > > Wow! That is an astoundingly good turn around time. > > LOL. > > > Error is: > > ; file: /home/brad/development/lisp/packages/verrazano-support/support.lisp > > ; in: DEFUN VTABLE-LOOKUP > > ; ((NCURSES-LIBRARY::VPTR > > ; (CFFI:MEM-REF NCURSES-LIBRARY::POBJ :POINTER NCURSES-LIBRARY::COFF))) > > ; > > ; caught COMMON-LISP:ERROR: > > ; illegal function call > > > > ; (CFFI:MEM-AREF NCURSES-LIBRARY::VPTR > > ; :POINTER > > ; (NCURSES-LIBRARY::- NCURSES-LIBRARY::INDX 2)) > > ; --> CFFI:MEM-REF CFFI-SYS:%MEM-REF SB-SYS:SAP-REF-SAP > > ; ==> > > ; NCURSES-LIBRARY::VPTR > > ; > > ; note: deleting unreachable code > > I'm unable to reproduce this error. It appears that your ncurses > version has C++ code in it, while mine does not. Would you mind > sending me a copy of your ncurses.h, along with the generated > ncurses-library.lisp? > > PS> The CFFI array length syntax change also broke C++ support. That's > been fixed in CVS now. > > Sincerely, > Rayiner Hashem > From brad.beveridge at gmail.com Mon Dec 5 01:51:29 2005 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Sun, 4 Dec 2005 17:51:29 -0800 Subject: Fwd: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: Sorry - accidentally only replied to Rayiner ---------- Forwarded message ---------- From: Brad Beveridge Date: Dec 4, 2005 5:50 PM Subject: Re: [fetter-devel] Verrazano and ncurses To: Rayiner Hashem Wow! That is an astoundingly good turn around time. > The other problem is the handling of wchar_t. Apparently, GCC-XML > considers wchar_t to be a fundamental type. This sort of thing keeps IMHO, it should be a CFFI type > In any case, if you're on *NIX, this should work now. Please try again > with the latest CVS copy. So I have a new issue now...see below. I haven't looked into it yet - but as your turnaround was so good before... :) My bindings file is: (defbinding "ncurses-library" (include "ncurses.h")) Cheers Brad Error is: ; file: /home/brad/development/lisp/packages/verrazano-support/support.lisp ; in: DEFUN VTABLE-LOOKUP ; ((NCURSES-LIBRARY::VPTR ; (CFFI:MEM-REF NCURSES-LIBRARY::POBJ :POINTER NCURSES-LIBRARY::COFF))) ; ; caught COMMON-LISP:ERROR: ; illegal function call ; (CFFI:MEM-AREF NCURSES-LIBRARY::VPTR ; :POINTER ; (NCURSES-LIBRARY::- NCURSES-LIBRARY::INDX 2)) ; --> CFFI:MEM-REF CFFI-SYS:%MEM-REF SB-SYS:SAP-REF-SAP ; ==> ; NCURSES-LIBRARY::VPTR ; ; note: deleting unreachable code ; compiling (DEFMACRO VIRTUAL-FUNCALL ...) ; /home/brad/development/lisp/packages/verrazano-support/support.fasl written ; compilation finished in 0:00:00 COMMON-LISP:WARNING: COMPILE-FILE warned while performing # on #. debugger invoked on a ASDF:COMPILE-FAILED in thread #: erred while invoking # on # Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [RETRY ] Retry performing # on #. 1: [ACCEPT] Continue, treating # on # as having been successful. 2: [ABORT ] Exit debugger, returning to top level. ((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:COMPILE-OP ASDF:CL-SOURCE-FILE)) # # # #) From brad.beveridge at gmail.com Mon Dec 5 15:47:37 2005 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Mon, 5 Dec 2005 07:47:37 -0800 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: > Also - how do I pass a NULL pointer to a function? Figured this out - cffi:null-ptr. Next question :) ncurses defines a function addchstr(const chtype*), chtype is an int type. I'd like to call it as (addchstr "test"), but I cant manage to convince SBCL's type system to pass the address of the string elements - though I suspect it would Just Work if the function took a char *. Any thoughts? Thanks again (the help has been wonderful) Brad From brad.beveridge at gmail.com Mon Dec 5 20:54:27 2005 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Mon, 5 Dec 2005 12:54:27 -0800 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: Arg - I am a dolt! I should not have been using addchstr to try and add a string to the screen - I should have been using addstr, which does accept a char *. I am at work now & can't test my "I am an idiot & am using the wrong function" hypotheses - but please don't expend effort on my last question. Cheers Brad On 12/5/05, Brad Beveridge wrote: > > Also - how do I pass a NULL pointer to a function? > > Figured this out - cffi:null-ptr. > Next question :) > ncurses defines a function addchstr(const chtype*), chtype is an int > type. I'd like to call it as > (addchstr "test"), but I cant manage to convince SBCL's type system to > pass the address of the string elements - though I suspect it would > Just Work if the function took a char *. Any thoughts? > > Thanks again (the help has been wonderful) > Brad > From brad.beveridge at gmail.com Tue Dec 6 03:46:57 2005 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Mon, 5 Dec 2005 19:46:57 -0800 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: Well, although I am an idiot, and I was using the wrong function. However, my question still stands. How do I easily convert a lisp string to the :pointer type that the Verrazano generated function expects? As another question, how come VZN generated in this particular way? The C header describes addstr as extern NCURSES_EXPORT(int) addstr (const char *); The VZN generated signature is (cffi:defcfun ("addstr" addstr) :int (anonymous939 :pointer)) If I change the (anonymous939 :pointer) section to (anon... :string) then I can happily call (addstr "blah") Should VZN have automatically generated :string instead of :pointer? I suspect that I maybe ought to be able to write a CFFI type translator, but that is beyond me right now. Thanks Brad On 12/5/05, Brad Beveridge wrote: > Arg - I am a dolt! I should not have been using addchstr to try and > add a string to the screen - I should have been using addstr, which > does accept a char *. I am at work now & can't test my "I am an idiot > & am using the wrong function" hypotheses - but please don't expend > effort on my last question. > > Cheers > Brad > > > On 12/5/05, Brad Beveridge wrote: > > > Also - how do I pass a NULL pointer to a function? > > > > Figured this out - cffi:null-ptr. > > Next question :) > > ncurses defines a function addchstr(const chtype*), chtype is an int > > type. I'd like to call it as > > (addchstr "test"), but I cant manage to convince SBCL's type system to > > pass the address of the string elements - though I suspect it would > > Just Work if the function took a char *. Any thoughts? > > > > Thanks again (the help has been wonderful) > > Brad > > > From rayiner at gmail.com Wed Dec 7 01:21:30 2005 From: rayiner at gmail.com (Rayiner Hashem) Date: Tue, 6 Dec 2005 20:21:30 -0500 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: > Sounds like a hard problem - a char * can be a byte pointer or a null > terminated string. It guess that maybe a good way to do it would be > to allow the user to specify in the generation file a default > behaviour and allow per function overrides. For example, in ncurses > char * is always a string. That's an idea. I wonder how many other libraries have predictable behavior like this... > > Cheers > Brad > > generate.lisp > (require 'asdf) > (asdf:operate 'asdf:load-op 'verrazano) > > (verrazano:create-binding > (verrazano:setup-build "gccxml" > (make-pathname :device "/" :directory "/tmp")) > "test.binding" > "test-library.lisp" > :cffi-backend) > (quit) > > test.bindings > (defbinding "test-library" > (include "/home/brad/development/lisp/bindings/test/test.h")) > > test.h > int main (int i); > > ---- Error Trace ---- > ; compiling file > "/home/brad/development/lisp/packages/verrazano-support/support.lisp" > (written 05 DEC 2005 10:29:57 PM): > ; compiling (DEFPACKAGE "VERRAZANO-SUPPORT" ...) > ; compiling (IN-PACKAGE "VERRAZANO-SUPPORT") > ; compiling (DEFUN VTABLE-LOOKUP ...) > ; file: /home/brad/development/lisp/packages/verrazano-support/support.lisp > ; in: DEFUN VTABLE-LOOKUP > ; ((TEST-LIBRARY::VPTR > ; (CFFI:MEM-REF TEST-LIBRARY::POBJ :POINTER TEST-LIBRARY::COFF))) > ; > ; caught COMMON-LISP:ERROR: > ; illegal function call > > ; (CFFI:MEM-AREF TEST-LIBRARY::VPTR > ; :POINTER > ; (TEST-LIBRARY::- TEST-LIBRARY::INDX 2)) > ; --> CFFI:MEM-REF CFFI-SYS:%MEM-REF SB-SYS:SAP-REF-SAP > ; ==> > ; TEST-LIBRARY::VPTR > ; > ; note: deleting unreachable code > > ; compiling (DEFMACRO VIRTUAL-FUNCALL ...) Oh, I think I understand the problem. I'll take a look at that when I get home (tomorrow :-/). You're on SBCL, right? Try commenting out the line "(asdf:operate 'asdf:load-op 'verrazano-support" in the generated library file. Does that fix the issue? Sincerely, Rayiner Hashem From ktilton at nyc.rr.com Wed Dec 7 02:56:12 2005 From: ktilton at nyc.rr.com (Kenny Tilton) Date: Tue, 06 Dec 2005 21:56:12 -0500 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: <43964F4C.4090000@nyc.rr.com> Rayiner Hashem wrote: >>Sounds like a hard problem - a char * can be a byte pointer or a null >>terminated string. It guess that maybe a good way to do it would be >>to allow the user to specify in the generation file a default >>behaviour and allow per function overrides. For example, in ncurses >>char * is always a string. >> >> > >That's an idea. I wonder how many other libraries have predictable >behavior like this... > > Probably not many. Anyway, I thought we were going to do something to parse Swig definitions for specific libraries. kt From luismbo at gmail.com Wed Dec 7 02:55:24 2005 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Wed, 7 Dec 2005 02:55:24 +0000 Subject: [fetter-devel] Verrazano and ncurses In-Reply-To: References: Message-ID: On 2005-dec-06, at 03:46, Brad Beveridge wrote: > Well, although I am an idiot, and I was using the wrong function. > However, my question still stands. How do I easily convert a lisp > string to the :pointer type that the Verrazano generated function > expects? > As another question, how come VZN generated in this particular way? > The C header describes addstr as > extern NCURSES_EXPORT(int) addstr (const char *); I suppose that, ideally, Verrazano should output an FFI declaration using :string for that function. Answering your question, you can convert a Lisp string to a newly- allocated C string using cffi:foreign-string-alloc (which you can then free with cffi:foreign-string-free) or you can use the cffi:with- foreign-string macro (probably what you want). See the CFFI User Manual for examples. Check out the other string- related functions and macros available too. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ Equipa Portuguesa do Translation Project http://www.iro.umontreal.ca/translation/registry.cgi?team=pt From brad.beveridge at gmail.com Thu Dec 8 05:57:33 2005 From: brad.beveridge at gmail.com (Brad Beveridge) Date: Wed, 7 Dec 2005 21:57:33 -0800 Subject: [fetter-devel] Global variables, macros and structs. Message-ID: Hi all, I have a few questions about VZN. I have used VZN to generate bindings for ncurses. I've started using the bindings and noticed a couple of things. 1) Global variables are not exported. Is there a reason for this, or just something that is on the to-do list? 2) Macros don't get auto generated. This sounds like a hard problem though, since C macros can be pretty weird at times. 3) If a header defines a struct the name of the struct is exported from the package, but the struct members are not. Eg, given a package FOO, with a struct BAR having a member BAZ, you need to access it as (cffi:with-foreign-slots ((FOO::BAZ) ptr BAR) ... ) For ease of use should the members also be exported? Back to #2, since C macros are probably hard to auto-generate, but trivial to hand code, does VZN support a mechanism for injecting custom code to the binding. What I mean is, I'd like 1 file (library.binding) that contains the info on how to generate the binding plus some code that I have hand done that should also end up (verbatim) in the generated file. That way I can write some helper code, and when the C header changes I can just re-generate from one file. Thoughts? Cheers Brad From smustudent1 at yahoo.com Tue Dec 13 17:03:06 2005 From: smustudent1 at yahoo.com (C Y) Date: Tue, 13 Dec 2005 09:03:06 -0800 (PST) Subject: [fetter-devel] gccxml install? Message-ID: <20051213170306.1665.qmail@web31712.mail.mud.yahoo.com> I took a run last night at getting the fltk demo working, and the generate step fails with a complaint about gccxml not working. However, gccxml is in my path. Do I need to put the fltk source tree in the test directory or some other trivial problem? I'm quite sure this is something dumb but I'm not sure how to check it - the error message is not all that helpful :-/. Cheers, CY __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From brad at sankaty.com Wed Dec 21 16:44:08 2005 From: brad at sankaty.com (Brad Anderson) Date: Wed, 21 Dec 2005 10:44:08 -0600 Subject: [fetter-devel] Verrazano / CFFI attempt - FreeTDS Message-ID: <43A98658.3030802@sankaty.com> Gents, I'm attempting to wrap the FreeTDS 0.63 library in CFFI (http://freetds.org) and running into some problems. I've pulled cffi-luis tarball from 2005-12-15 and verrazano cvsroot tarball from 2005-12-19. I'm also using SBCL 0.9.6 on Gentoo Linux. All of the prerequisites are installed, including PARSE-NUMBER (Rayiner, see other email to you yesterday). Here are my files: % cat freetds.db-lib.binding (defbinding "freetds.db-lib" (nicknames "dblib") (flags "") (include "sqldb.h" "sqlfront.h") (export "") (override "")) % cat generate.lisp (require 'asdf) (require 'cffi) (asdf:operate 'asdf:load-op 'verrazano) (verrazano:create-binding (verrazano:setup-build "gccxml" (make-pathname :device "/" :directory "/tmp")) "freetds.db-lib.binding" "freetds.db-lib.lisp" :cffi-backend t) Here's the debug output: ;;;; Compile file /home/brad/dev/lisp/clmssql/cffi/generate.lisp ... ; compiling file "/home/brad/dev/lisp/clmssql/cffi/generate.lisp" (written 20 DEC 2005 03:29:39 PM): ; /home/brad/dev/lisp/clmssql/cffi/generate.fasl written ; compilation finished in 0:00:00 0 # 1 DEFINES NAMESPACE-TYPE :: 1 ALLOCATES NAMESPACE-TYPE :: named :: 1 NAMESPACE-TYPE :: 2 ALLOCATES QUALIFIED-TYPE anonymous7621 named no-unused-sqlfront-h-warn 2 ALLOCATES QUALIFIED-TYPE anonymous7623 named rcsid-sqlfront-h 2 ALLOCATES QUALIFIED-TYPE anonymous7625 named no-unused-sqldb-h-warn 2 ALLOCATES QUALIFIED-TYPE anonymous7627 named rcsid-sqldb-h 2 DEFINES FUNDAMENTAL-TYPE char 2 DEFINES FUNDAMENTAL-TYPE void 2 DEFINES QUALIFIED-TYPE anonymous7621 2 DEFINES QUALIFIED-TYPE anonymous7623 2 DEFINES QUALIFIED-TYPE anonymous7625 2 DEFINES QUALIFIED-TYPE anonymous7627 2 DEFINES POINTER-TYPE anonymous7619 2 DEFINES QUALIFIED-TYPE anonymous7618 2 QUALIFIED-TYPE anonymous7621 3 EXTENDS ARRAY-TYPE anonymous7620 3 ARRAY-TYPE anonymous7620 4 EXTENDS POINTER-TYPE anonymous7619 4 POINTER-TYPE anonymous7619 5 EXTENDS QUALIFIED-TYPE anonymous7618 5 QUALIFIED-TYPE anonymous7618 6 EXTENDS FUNDAMENTAL-TYPE void 6 FUNDAMENTAL-TYPE void 2 QUALIFIED-TYPE anonymous7623 3 EXTENDS ARRAY-TYPE anonymous7622 3 ARRAY-TYPE anonymous7622 4 EXTENDS FUNDAMENTAL-TYPE char 4 FUNDAMENTAL-TYPE char 2 QUALIFIED-TYPE anonymous7625 3 EXTENDS ARRAY-TYPE anonymous7624 3 ARRAY-TYPE anonymous7624 4 EXTENDS POINTER-TYPE anonymous7619 2 QUALIFIED-TYPE anonymous7627 3 EXTENDS ARRAY-TYPE anonymous7626 3 ARRAY-TYPE anonymous7626 4 EXTENDS FUNDAMENTAL-TYPE char Here's the resulting lisp file: % cat freetds.db-lib.lisp (defpackage "FREETDS.DB-LIB" (:use #:CFFI) (:nicknames "DBLIB") (:export)) (in-package "FREETDS.DB-LIB") (asdf:operate 'asdf:load-op 'verrazano-support) (cl:progn) So something isn't working, and I lack both Lisp skills as well as C development experience. It's a great combination, I know ;) but I was hoping to sneak by for a little while with your tools. Is this a problem w/ C vs. C++ as the source? Any help would be appreciated. Cheers, Brad From fb at frank-buss.de Fri Dec 30 22:50:01 2005 From: fb at frank-buss.de (Frank Buss) Date: Fri, 30 Dec 2005 23:50:01 +0100 Subject: [fetter-devel] Windows.h with Verrazano Message-ID: <20051230224959.19EB4DA524@smtp4.netcologne.de> I've posted this to comp.lang.lisp and Kenny suggested to post it to this mailing list, too. Meanwhile I've tried the MinGW windows.h, the setting "--gccxml-compiler msvc71" but nothing works. I don't know, if this project is still alive, but here is my problem: I've installed Verrazano from CVS from today and the "simple" testsuite works with Lispworks after fixing some path problems. Then I've copied the windows.h from Visual Studio C++ 7.0 and all other header files to the "simple" directory and changed the simple-binding file like this: (defbinding "simple-library" (nicknames "simple") (flags "-I/data/projects/asdf/verrazano/testsuite/simple -D WIN32 -D NDEBUG -D _WINDOWS -D _MBCS") (include "windows.h") (export "don't care") (override "not supported yet")) I tried to generate it like this: (use-package "VERRAZANO") (create-binding (setup-build "/Programme/gccxml/bin/release/gccxml.exe" "/tmp/") "/data/projects/asdf/verrazano/testsuite/simple/simple.binding" "/data/projects/asdf/verrazano/testsuite/simple/simple-library.lisp" :cffi-backend t) It needs some minutes and vzntemp.cpp, vzntemp.mac (2.7 mb) and vzntemp.xml (7.1 mb) are generated, but then it says: 1 DEFINES NAMESPACE-TYPE :: 1 ALLOCATES NAMESPACE-TYPE :: named :: 1 NAMESPACE-TYPE :: NIL and the contents of simple-library: (defpackage "SIMPLE-LIBRARY" (:use #:CFFI) (:nicknames "SIMPLE") (:export)) (in-package "SIMPLE-LIBRARY") (asdf:operate 'asdf:load-op 'verrazano-support) (cl:progn) Is this a bug? How can I generate the bindings for windows.h? -- Frank Buss, fb at frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de From fb at frank-buss.de Fri Dec 30 23:15:48 2005 From: fb at frank-buss.de (Frank Buss) Date: Sat, 31 Dec 2005 00:15:48 +0100 Subject: [fetter-devel] Windows.h with Verrazano Message-ID: <20051230231545.109A7DA52B@smtp4.netcologne.de> Just in case you want to debug or reproduce it without downloading windows.h from MinGW or using it from VC++, this is the output from gccxml (latest CVS release, too), vzntemp.mac/.xml: http://www.frank-buss.de/tmp/vzntemp.zip I've changed the vzntemp.cpp to vzntemp.c, but this didn't solve the problem. -- Frank Buss, fb at frank-buss.de http://www.frank-buss.de, http://www.it4-systems.de