On Mon, Jun 19, 2006 at 06:36:25PM +0200, Lars Gullik Bjønnes wrote:
> | stdafx.h contains all commonly used headers. msvc knows from a
> | compiler flag (or by default) that stdafx.h (stopping header) is
> | pre-processed and skip it.
> 
> Use #pragma hdrstop instead.

Looks like I have a really bad day.

How is '#pragma hdrstop' less intrusive than  '#include <pch.h>'
other than the latter could be made working across all platform whereas
the former certainly could not?

[No, I am not promoting <pch.h>, rather -include or whatever autoconf is
able to spit out]

> Then we can by adding a pch.cpp, avoid adding #include "pch.hpp" to
> all files.... but are msvc clever enough to avoid duplicate reading of
> include files that exists both in pch.hpp and in file.hpp?

Even if it weren't (which I doubt) it would not matter much.  MSVC is
several times faster than gcc when compiling.

Andre'

Reply via email to