On Tue, 2007-11-06 at 00:22 +0100, Martin Metzker wrote: > Hello World! > > I just finished up the last work of the first version of my software. > While doing that I remembered something I read in the Gtkmm tutorial. > Iirc it said > #include <gtkmm.h> > is bad practice because the overhead is rather big, which is not > desireable. I tried it. I went through all my header files and included > only the neccessary headers e.g. <gtkmm/window.h>. The resulting program > is 412K big. The original version which simply includes gtkmm.h is 420K. > So is it really worth it including single header files?
The issue isn't really about object file size. The issue is more about compile speed and compilation dependencies. If you include gtkmm.h, the compiler has to include (and therefore parse, etc) every single gtkmm header file. If you only include the ones you need, the compiler doesn't have to work as hard and your build will theoretically be quicker. But if build time isn't an issue for you, then feel free to just include the gtkmm.h header. -- Jonner _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
