[AD] Individual header dependency

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I can't #include <allegro/gui.h> individually because gui.h includes
gui.inl, which requires acquire_bitmap and release_bitmap to be
defined, which are defined in gfx.inl. Trying to include gfx.inl
before gui.inl doesn't work because gfx.inl depends on gfx.h.
Is this a bug or a feature? I found this trying to pre-define DIALOG
in one .h file where I didn't want to include the whole allegro.h.

BTW, I can't do 'void my_func(struct BITMAP *bmp)' because I get a
warning from gcc saying that the struct is defined inside a parameter
list. Putting 'struct BITMAP;' on a separate line before silences
this. How is gcc so pedantic? Is it a bad idea to use the first
idiom in header files? I remember doing that at work constantly to
avoid including large header files and it worked ok...

Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/