Thank you, <br><br>I found the code to do that.  <br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 11:50 AM, 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 style=""><br><div><div class="Ih2E3d"><div>On Jan 21, 2009, at 9:48 AM, VanDung To wrote:</div>
<br><blockquote type="cite">Thanks for the quick response.  <br><br>I'm not looking for a compile time option (-include -I).   In the environment I'm looking at, it is very awkward to force the user to specify the include file every time. Is there a way for clang to do this without using the compile time option?   I'm willing to modify/hack some code.</blockquote>
<div><br></div></div><div>Sure, the "-include" option just adds a #include to the predefines buffer.  If you look at how -include is implemented, you can see this in action and do something similar.</div><div><br>
</div><font color="#888888"><div>-Chris</div></font><div class="Ih2E3d"><br><blockquote type="cite"><br> <br>Sincerely, <br><br><div class="gmail_quote">On Wed, Jan 21, 2009 at 11:42 AM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com" target="_blank">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><br> On Jan 21, 2009, at 9:39 AM, VanDung To 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;">
 Hello,<br> <br> I'm not sure if there's a way in clang to do this, however, I'd like to automatically include a header file every time I compiles a program.  What would be the best way to do this?  Can I do this externally to the compiler or do I need to modify the compiler.<br>
 </blockquote> <br></div> You can use the -include option, it works just like gcc:<br> <br> $ echo "typedef int x;" > t.h<br> $ echo "x y;" > t.c<br> $ clang t.c -include t.h -I.<div><br> <br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 <br> Also, I'd like to have my header files precompiled. Where can I find the documentation on how to do this.<br> </blockquote> <br></div> PCH is still under active development, the command line options are the same as those used by gcc.<br>
<font color="#888888"> <br> -Chris<br> </font></blockquote></div><br></blockquote></div></div><br></div></blockquote></div><br>