On VS2008 compile the sdk through the standard makefile is pretty slow on my computer.
I noticed there's a thing called pre-compiled header. I tried to modify the makefile to enable it. But I get lots of error message.
Anyone has any idea how to enable pre-compiled header with Civ4? Or any general idea to improve compiling speed is huge to me. Thanks.
If you are compiling with the standard technique in "Refar's Guide", then you are not actually *compiling* with the VS2008 compiler. You have also installed the VS2003 compiler and the makefile is calling that explicitly. You are just using the VS2008 tool as a GUI, to run "make".
So any specific VS 2008 option you turn on will not have the intended effect. I am not familiar with the documentation for VS 2003; but if you find that, and you can find command line options for precompiled headers, it may be faster.
Perhaps you already know this technique, but in general, try to avoid full recompiles. I try to make all my header changes once, then do a full compile, and then after that I can tweak the source files multiple times. Recompiling everything takes time, but if I avoid header changes, this is not needed.
In a typical sdk change project, I add new headers once and do a full recompile, say 20 minutes; then recompiling and relinking a single C file each time takes maybe 2-3 minutes. Out of that time, most of it is in the linker. I am quite sure that precompiled headers will not affect link time. I can't think of much to affect link time.