Subject: [Nel] precompiled header file

From: "zen" <[email-masked]>
Date: Thu, 20 Dec 2001 15:20:09 +0800

Hi all!

I don't know whether gcc support precompiled header or not, but VisualC++ do support it. So, I suggest the VC++ workspace setting take advantage of this. I've make some experiment on the 'misc' project. The compiling time drop from 2 minutes to 1 minute and 30 seconds, reduced about 25% , not bad.

And in case you don't know how to set precompiled header file support, these are the steps:
1. Add to the project a .h file, e.g stdafx.h, which #includes those common header files, particularly STL header files .
2. Add a dumb .cpp file, e.g stdafx.cpp, which do nothing more than #include "stdafx.h".
3. Change project setting, in 'C/C++' tab 'Precompiled Headers' set it to 'Use precompiled header file [.pch]' through header: stdafx.h.
4. Change the setting of stdafx.cpp to 'Create precompiled header file [.pch]'.
5. Add every .cpp file a line #include "stdafx.h".
6. recompile.

Hope this would be helpful.

Regards,
Zen Jean

---

From: "Vianney Lecroart" <[email-masked]>
Date: Wed, 26 Dec 2001 13:59:57 +0100

Hi Zen,

>I don't know whether gcc support precompiled header or not, but VisualC++
do support it.

We know precomp headers and we don't include it because on big project we
already had some strange bug during compilation because of precomp headers
so we decided to not use them because we already have lot of strange visual
bug to don't add more.
But we'll do a try soon and add them in the CVS if it works fine.

Vianney Lecroart
---
lead network programmer / nevrax.com
icq#: 6870415
homepage: http://ace.planet-d.net
www.geekcode.com: GCS/E d- s+++: a-- C+++$ UL++ P- L+++>+$ E+>- W++ N+ o? K-
w++$ O- M- V- PS- PE? Y PGP t 5? X+ R- tv++ b- DI D+ G e++ h+ r-- y?