help-gplusplus
[Top][All Lists]
Advanced

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

C++ precompiled header


From: Greg
Subject: C++ precompiled header
Date: 26 Aug 2005 08:10:28 -0700
User-agent: G2/0.2

I have a C++ project on Linux RedHat running gcc 3.4.3 that is very
heavy in preprocessing.  I am trying to use precompiled header but have
a hard time verifying that my precompiled headers are in fact being
used.  Here is what I have done:

1. The object files reside in a separate directory from sources.
2. A give pch.h file is compiled into pch.h.gch and resides in the
build directory at the same level as the output .o's.
3. When objects are built, each build steps seems to be taking for
ever.
4. When I run just the preprocessor (-E option) I don't see pch.h.gch
in the output.  In fact, I see the pch.h file and contents of every
file that it includes.  This seems to be a direct contradiction of
precompiled headers.
5. When I run with options "-MMD -MP -MF" to create dependancies of any
of the object files, I don't see pch.h.gch listed anywhere.
6. Running with -Winvalid-pch doesn't produce any warnings either.

I also tried putting pch.h.gch in the exact same directory where the
pch.h comes from but that doesn't seem to have any difference at all.

Is there any good way of verifying that a precompiled file is in fact
being used?  I looked through the g++ man page to find any relevent
debbuging/dumping options but couldn't find anything that apply.
Thanks in advance for any help.

Greg



reply via email to

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