ways to reduce compiling time

is there any short article introducing all "tricks" to struct the c++ project to make it compile faster?
I have a big c++ project, which takes maybe 10 times longer to compile with with a small change, compared with c# projects with similar size.
thanks
You should probably use the Makefile in an intelligent way.
If you have many .C and .h files, every time you change one *.C file, you should not compile all the files but just that .C file.

But, if a .h is changed you need to compile all the files which use that header file.

Likewise you can reduce the compile time.
If you are not using Makefile, learn how to use it.
i use vstudio in windows. basically, from what you say, i see rule 1 is try to use forward class in header file, and try to include header in cpp file, correct? thanks
Yes.
If there is a small logic change made in cpp file, it should not compile all the other files.
One way I know is to remove unnecessary included header files from header files. A simple declaration can work instead of including entire header file.

//in A.h

#include "X.h"//This is not needed
//Class X will suffice

Class A
{
private :
X* x;
...
}
obligatory link:

http://cplusplus.com/forum/articles/10627/

specifically, section 4
really appreciate you guys' help. will read through Disch's link and may be back for questions.
thanks a lot
Topic archived. No new replies allowed.