Yeah, you probably need to do a clean before you build (rebuild all or whatever it's called in MS speak), as the precompiled headers will "know" whether you are using C++ or C when compiling the header, so if you just rename the file, it will still think the precompiled header is the same [my personal opinion is that precompiled headers are only worth-wile in big projects - in small projects the saving is pretty small, really].
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
First thing I turn off in new projects, usually in the wizard, or first thing if the wizard wont let me (win32 projects). The savings even on large projects are negligiable. I have one project that has 100,000 lines of code in ~100 files, each including ~5 headers. It takes about 2 minutes to compile with PCH and 2 minutes 30 seconds without. I dont honestly see the point. I suppose if you had millions of lines of code and tens of thousands of #include's it migth make a bigger difference, but again, whats the point, you will still be compiling for an hour.
IMO they woudl get better performance by multithreading the compile. FileA can be compiled in parallel with FILEB, the linker stage would probably still need to be serial, but not compilation.
Last edited by abachler; 05-15-2008 at 09:17 AM.