Hi Chris,<br><br>Sorry for the confusion, just to clarify, I am building a source transformer based on Clang. So I am doing a small example aside to better understand the Clang classes. (I have my own main, not using clang-cc.cpp)<br>
<br>As I look into clang-cc.cpp, I can see that Clang initializes the header search paths using the relative include path. <br>Eventually I will rely on clang-cc.cpp and have the transformation as a command line option.<br>
<br>Thanks,<br>Moataz<br><br><br><div class="gmail_quote">On Fri, May 1, 2009 at 6:20 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
On Apr 30, 2009, at 7:06 PM, moataz ragab wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
I am trying to use the initHeaderSeach and initialize it with the default system include paths. On my installation, Fedora 10 the one of the system include path (needed for stdef.h) is not one of the listed in the initHeaderSeach. So In my code, I used the AddPath and now it works. Also on different version with 64 bit fedora 9, it is on /usr/lib/gcc/x86_64-redhat-linux/4.3.0/include<br>

</blockquote>
<br></div>
Hi Moataz,<br>
<br>
Clang includes its own stddef.h file that it should fine relative to the path of the executable.  Do you know why this isn't working?<br>
<br>
-Chris<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<br>
<br>
Below is a sample code:<br>
<br>
  InitHeaderSearch init(context.headers);<br>
  init.AddDefaultSystemIncludePaths(context.opts);<br>
  init.AddPath("/usr/lib/gcc/i386-redhat-linux/4.3.2/include/",<br>
           (InitHeaderSearch::IncludeDirGroup) 2, true, false, false);<br>
<br>
Best regards,<br>
Moataz<br></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>
</blockquote>
<br>
</blockquote></div><br>