On 30 Sep, 2004, at 22:55, Aaron Ballman wrote:
How about a little pseudo-compiler than can take a header file, suck
out all the constants, and write declares for the functions? To get
the right library, it would plow through DLLs in a folder. That way,
these things would be header file oriented rather than library
oriented and we could apply it to other kits that come along. I'd
help.
I've thought about this approach, but after having seen the Windows
header files, I don't feel like writing a C compiler just to spit out
RB declares (which is effectively what we would need to do).
I agree. Aaron and I discussed this a little, since it was kinda
originally my idea to do this Win32 API library. The problem with your
suggestion Brad is the use of the word "little" in the same context as
"compiler". For C/C++, there is no such thing :-)
There are other tools like SWIG, but they too don't do a particularly
intelligent job of translating the headers. They do straight ports as
far as they can approximate the APIs in the target language.
For what we're intending, we'll port the headers piece-wise for modules
people would actually use, and try and make them a bit more
RB-user-friendly in the process; for example, hiding all the ASCII and
Wide character variations of Win32 APIs away inside the API functions
we expose, and automatically doing the appropriate translations so the
RB users don't have to worry about it.
I mean.. they use BIT FIELDS in some of their structures. I've never
seen that anywhere. Ever.
You've evidently never programmed for a Sony PS2 :-) Admittedly, such
structures as use bitfields are mainly for programming chip registers.
--
Kind Regards,
James Milne
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|