[fetter-devel] Possible solution for multiple includes

Frank Goenninger - PRION Consulting fgoenninger at prion.de
Sun Oct 9 17:39:18 UTC 2005


Yo, Kenny:

Am 09.10.2005 um 12:16 schrieb Kenny Tilton:

>
>
> Frank Goenninger - PRION Consulting wrote:
>
>
>> I will have to look into GCC-XML further, but I still don't see  
>> why  you don't do what C does:
>>
>> All the includes are included. That, for me, means: Everything in   
>> every included include-file has to be declared/defined:  
>> functions,  data types, constants, ...
>>
>
> The problem is on win32, where something like FreeGlut.h (IIRC) may  
> include a little thing called "windows.h".
>
> Want to guess how big was the resulting freeglut-library.lisp? :)

A recall you said something about 700k ... Or even more ...

>
> Now leave aside that problem (windows.h including everything under  
> the sun whether freeglut needs it or not). How about stdlib.h,  
> which Freeglut likely does need. Do we want bindings for that?  
> Absolutely not if we are just trying to get to Freeglut. Freeglut  
> has an API, and that is all we want.

I fully agree. This makes the "include challenge" some degrees more  
complex: Find out what Freeglut needs - recursively, because there  
might be a #define HAHA  HEHE in file "a.h" and the #define HEHE HIHI  
in file "b.h" and then the #define HIHI 1 in file "c.h", each having  
more than just this #define in it and there bringing along more stuff  
and bindings. So, we need to cut away all the things that are "not  
requested" by Freeglut ... Doable, I think. But why? Speed? Size?  
Well, yes, of course. But a couple of more GB of main memory and  
we're done ;-)

>
> True, some C junkie might get off on having stdlib at their  
> disposal from Lisp, but that is completely unrelated to getting  
> bindings to Freeglut, and they should be getting those bindings by  
> making stdlib-binding.lisp and using VZN on that.

Right. And VZN and ASDF may work together to do this. If VZN creates  
bindings for every single .h file / lib it finds and puts everything  
in a well-known place (a repository) then we're done. (see my other  
post on this). No? I wonder if I am still on the wrong thinking  
track ...

>
> kt

Cheers
    Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: Signierter Teil der Nachricht
URL: <https://mailman.common-lisp.net/pipermail/fetter-devel/attachments/20051009/e872c46f/attachment.sig>


More information about the fetter-devel mailing list