Re: Very slow compilation



If you're using GCC 3.4, you can use the new Precompiled Headers.

http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Precompiled-Headers.html#Precompiled-Headers

The way I did this was make one file which includes the Gtkmm stuff (pch.h) and compile that header with gcc -x. All C++ files which need gtkmm would then just #include "pch.h". No other files should include gtkmm.h, or else the compile will be slow.

I have an example makefile on my machine at home. I can send it to you if you want. Let me know.

Alan.



Leif wrote:

Hi,

I am developing a program using gtkmm and libglademm and (sigc++).

My problem is that it compiles dam much slower than my other programs
that don't use gtkmm/libglademm. Recompiling a smaller .cpp file takes
~10 seconds (without linking, 12 with linking). A .cpp file of
comparable size, from a project that don't use gtkmm/libglade takes 2
seconds for compiling and linking.

From my Makefile.am:
LIBS = `pkg-config gtkmm-2.4 libglademm-2.0 sigc++-1.2 --libs`
#CXXFLAGS =
CPPFLAGS = `pkg-config gtkmm-2.4 libglademm-2.0 sigc++-1.2 --cflags`


I tried to replace all ocurences of #include <gtkmm/gtkmm.h> with
include statements for only the needed files. But no notable difference.


Is there anything I can do to speed the compilation up, other than
buying a new computer or switching to another library?

Best regards,
Leif Linse
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]