I'm also trying to program along these guidelines to optimize compilation speed. But sometimes things really depend on each other...
I think fluid can easily implement a simple algorithm that will prevent redundant header file updates for most of the time. For example, function bodies in fluid (which are stored in cpp files) are implemented using "Code..." menu option. So if a user only updates one of these items, it is guaranteed that the change is in the source file, not the header. Is that not so? So if the only modification is of this sort, there is no need to rewrite the header file. For anything else, both the header and source can be rewritten. This approach may still sometimes redundantly update header files. But it will still be optimized since changes in "Code..." blocks won't cause header updates. What do you think? > Well, it would require fluid to be able to analyse if some fluid > modification would actually mean modification of the header file or not, > so it would be quite significant change to the fluid. > > But there is "workaround" which works for me: > > 1) if I have many independent GUI elements, I split it to independent > fluid files (each window/widget definition in separate .fl file) and > include only used headers > > 2) isolate GUI and non-gui parts of the program to independent files. > Usually I need only one relatively short source to code around > particular gui window/widget where the fluid-generated header is included > > 3) If I need some reference to a GUI object, I usually use it only > through a pointer and put general definition like > class Foo_Class ; > without actual inclusion of Foo_Class.H header in other headers and api > definitions > > 4) And ... (yeah, very boring, I am lazy too...) cleaning after adding > substantial part of features (read:bloat) usually helps to reduce > headers cross-inclusion and dependency. > > R. > > > Oguz Akyuz wrote: > > Hi Everybody, > > > > I've been using FLTK for some time now, and I'm generally very satisfied > > with it. However, one nuisance that often disturbs me is when I "Write > > Code" using fluid, it updates both header and sources files causing the > > subsequent compilation take a painstakingly longer time. This is especially > > a problem if the project is large and the updated header file causes many > > files to compile. > > > > So instead of blindly updating both header and source files, can "Write > > Code" be a little more intelligent and update the header file only when > > necessary (i.e. when the interface changes, etc.)? > > > > My apologies if this feature already exists and I'm ignorant about it. > > > > Thanks, > > Oguz _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

