nel-all
[Top][All Lists]
Advanced

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

[Nel] precompiled header file


From: zen
Subject: [Nel] precompiled header file
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
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]