<html>
<head></head>
<body>
<p>Hi Jordan,</p>
<p>My tool wasn't in the "/usr/local/bin" directory, I didn't know that. I have copied the executable to the directory and have worked without any problem.<br/>
My headers are in ../<strong>include/</strong>clang/3.x/include/ not in lib/clang.</p>
<p>Thanks!</p>
<p>I also have another issue with headers and I hope you don't mind to have a look if it's not much asking.</p>
<p>In the program I'm parsing with Clang, the headers are of type angled <parent_directory/file.h>.To compile the program I can use "clang++ -I. -I.. " so that the headers are found. But, in my tool I don't know how can I indicate that clang includes the parent directory when creating the AST.</p>
<p>I'm using something like this to parse the code:<br/>
 ...<br /> ClangTool Tool(OptionsParser.getCompilations(), file); <br /> Tool.run(newFrontendActionFactory(&mytool));<br/>
...<br/>
so I would need to tell the object "Tool" to find also in the parent directory. Or is there a simple way to do this that I'm overlooking?</p>
<p>Thanks again,</p>
<p>Pedro.</p>
<div><em>El día 07 mar 2014 18:43, Jordan Rose <jordan_rose@apple.com> escribió:</em></div><blockquote class="replyBlock" style="border-left: 2px solid #000083; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>On Mar 7, 2014, at 4:28 , Pedro Delgado Perez <<a href="mailto:pedro.delgadoperez@mail.uca.es">pedro.delgadoperez@mail.uca.es</a>> wrote:</div><br/>
<blockquote class="replyBlock" style="border-left: 2px solid #000083; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><p>Hi,</p>
<p>I think I have a problem with my Clang installation. I know that this problem is not new, but I don't know how can I solve it in spite of reading some forums with the same issue. When I run my tool, I got the following error:</p>
<blockquote class="replyBlock" style="border-left: 2px solid #000083; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><p>...<br />In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/string:42:<br />In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/char_traits.h:42:<br />In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/bits/postypes.h:42:<br />In file included from /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/cwchar:46:<br />/usr/include/wchar.h:40:11: fatal error: 'stdarg.h' file not found<br /># include <stdarg.h><br />...</p>
</blockquote><p>Clang is not searching in "/usr/local/lib/clang/3.4/include", where, for instance, the library "stdarg.h" is located. This is the result when executing "clang++ -v":</p>
<p>clang version 3.4 (192773)<br />Target: x86_64-unknown-linux-gnu<br />Thread model: posix<br />Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.6<br />Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.6.3<br />Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6<br />Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.3<br />Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6<br /><br /><br />Therefore, the directory of clang is not being search isn't it?. Does anybody know how can I solve this problem in an easy way? I have no broad knowledge of Clang.</p>
<p>Thanks in advance,</p>
<p>Pedro.</p>
</div></blockquote></div><div>Just to sanity check, is your tool in /usr/local/bin? Clang looks for these headers relative to the location of the binary.</div><div>Also, between the 3.4 and 3.5 releases, the headers moved to ../<strong>include/</strong>clang/3.x/include/, instead of lib/clang/... Maybe you picked up that commit by mistake?</div><div>Jordan</div></blockquote>
</body>
</html>