<div dir="ltr">Yea, I argued with chandler for a long time that we should just put the internal headers into the tools (compile them in), but was not able to convince him (yet).<div><br></div><div>Cheers,</div><div>/Manuel</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 5:10 AM, Joshua Cranmer 🐧 <span dir="ltr"><<a href="mailto:Pidgeot18@gmail.com" target="_blank">Pidgeot18@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
<div>On 6/19/2014 2:46 PM, Sandeep K
Chaudhary wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi guys,
<div><br>
</div>
<div>I am doing some basic source to source transformation by
iterating through the AST using Clang front-end. And, it is
working fine i.e. I am able to get transformed code with
insertions.</div>
<div><br>
</div>
<div>However, when I have some header file inclusions in the
input source code such as "#include<stdio.h", it produces
an error message when transforming the code. It is -</div>
<div><br>
</div>
<div>
<div><b>input.c:1:9: fatal error: 'stdio.h' file not found</b></div>
<div><b>#include<stdio.h></b></div>
<div><b> ^</b></div>
</div>
<div>So my question is - how can I avoid getting this error
about header files? For all practical use, my input source
files will have the header files. Please let me know.</div>
<div><br>
</div>
</div>
</blockquote>
<br></div></div>
This is a well-known issue that is unfortunately documented
extremely poorly (or, rather, the documentation does absolutely
nothing to call out what is arguably the single most common failure
beyond "I'm missing -I or -l in my compile commands").<br>
<br>
The short version: drop your tool in /usr/local/bin and run it from
there.<br>
<br>
The longer version: in the absence of specific options indicating
otherwise, the lookup for files usually found in places under /usr
is done using $(dirname
argv[0])/../lib/clang/<version>/include and similar paths.<span class="HOEnZb"><font color="#888888"><br>
<br>
<pre cols="72">--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist</pre>
</font></span></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></div>