<div class="gmail_quote">On Sun, Jun 10, 2012 at 2:52 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The system headers thing is a major gotcha that really frustrated me when I was first starting to program with clang. The reality is that the work of setting up the default system headers is done by the Driver (or Frontend, I forget which). Those parts of clang are separate from the Preprocessor, so there is just no simple way to have it "just work" :(<div>

<br></div><div>The "usual" way to work around this is to run as a clang plugin. There are docs about that at <a href="http://clang.llvm.org/docs/ClangPlugins.html" target="_blank">http://clang.llvm.org/docs/ClangPlugins.html</a></div>
</blockquote><div><br></div><div>Depending on what your goals are, libclang or libtooling might also fit your use case.</div><div>Start at:</div><div><a href="http://clang.llvm.org/docs/Tooling.html">http://clang.llvm.org/docs/Tooling.html</a></div>
<div>with a comparison of the approaches (I don't know whether libclang supports preprocessor interception; if not, libtooling and clang plugins are your options).</div><div><br></div><div>Cheers,</div><div>/Manuel</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br></div><div>best of luck,<div>--Sean Silva<br><br><div class="gmail_quote"><div><div class="h5">On Sat, Jun 9, 2012 at 2:22 PM, Bertjan Broeksema <span dir="ltr"><<a href="mailto:broeksema@kde.org" target="_blank">broeksema@kde.org</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi all,<br>
<br>
I'm trying to get known with using the clang libraries but I'm somewhat<br>
stuck. First of all most documentation (in particular tutorials) seem<br>
outdated, any pointers would be appreciated.<br>
<br>
Currently I've a simple program which does nothing more than setting up the<br>
preprocessor but it doesn't find standard include headers it seems. Probably<br>
I'm missing something trivial but I currently don't see what. Any help would<br>
be appreciated.<br>
<br>
For the context, I'm trying to write a little program that prints out the<br>
include tree of a source file.<br>
<br>
Cheers,<br>
<br>
Bertjan<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br>