[Top][All Lists]

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

Re: PCH support

From: Olaf van der Spek
Subject: Re: PCH support
Date: Fri, 23 Dec 2011 22:58:56 +0100

On Fri, Dec 23, 2011 at 10:11 PM, Dave Hart <address@hidden> wrote:
> Another monkey wrench is gcc and Visual C++ have different models for
> how PCH is implemented.  Support in Automake would ideally target both

Have they? AFAIK they're equivalent.

> by finding a compatible subset.  I'm sure there are existing
> open-source models that demonstrate how to use both gcc and VC
> precompiled headers.  As I recall, gcc support is a bit more generic
> but involves a separate PCH invocation to "compile" the headers, while
> VC++ requires precomp.h be the first item included in each
> participating file but doesn't require a separate compiler invocation
> -- the first one that can use the precomp.pch generates it.

Both have a step to generate the PCH. VC builds stdafx.h via
stdafx.cpp, GCC builds a header file directly. Both basically require
the header to be the first include for PCH to be usable.


reply via email to

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