<div dir="ltr">You might be able to load them... but you won't be able to do anything useful with them: PCH doesn't include an appropriate semantic model to avoid issues like the redefinitions you ran into. The correct semantic model is modules... see <a href="http://clang.llvm.org/docs/Modules.html" target="_blank" style="font-family:arial,sans-serif;font-size:13px">http://clang.llvm.org/docs/Modules.html</a> .<div>
<br></div><div>-Eli<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 13, 2013 at 5:49 PM, Yao SHEN <span dir="ltr"><<a href="mailto:yaoshen@andrew.cmu.edu" target="_blank">yaoshen@andrew.cmu.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>It seems I can use multiple PCH
files to parse. I replace #include .h with PCH loading in
PPCallback. I have successfully loaded multiple PCH files in that
way.<br>
<br>
-Yao<br>
<br>
On Tue, Aug 13, 2013 at 8:27 PM, Eli Friedman
<a href="mailto:eli.friedman@gmail.com" target="_blank"><eli.friedman@gmail.com></a> wrote:<br>
</div><div><div class="h5">
<br>
<blockquote type="cite">
<div dir="ltr">On Tue, Aug 13, 2013 at 5:21 PM, Yao SHEN <span dir="ltr"><<a href="mailto:yaoshen@andrew.cmu.edu" target="_blank">yaoshen@andrew.cmu.edu</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>I want to try in following way. Would you please
check if it is feasible for me?<br>
<br>
1. For each .h file, I generate one PCH file;<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>This is already not feasible. I mean, you can generate
the files, but you can't use multiple PCH files together
to compile a .cpp file.</div>
<div><br>
</div>
<div>-Eli</div>
<div><br>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</div></div></div>
</blockquote></div><br></div></div></div>