<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>You need to modify the VS project file. If you’d created
the project using CMake this shouldn’t have been a problem, but in any
case…<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>It sounds like you may have, for whatever reason, told Visual
Studio not to use the standard includes (MSVC, the Microsoft Visual C++
compiler that VS invokes internally, of course has a set of standard C/C++
libraries and headers that it will use unless told not to).<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Open the Project Properties<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Under C/C++, find the Preprocessor page (I’m working from
memory here; it varies between versions but should be a page or tab or similar).<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>In the Preprocessor page, there will be an entry for something
like “Use standard Includes” {TRUE|FALSE}. Make sure this is set to
TRUE.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>You will also find an entry like “[Additional] Include
Directories” or similar, which will have a browse button. This is where
you specify the folders within the LLVM directory structure that contain header
files.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Add here all of the …\include directories for LLVM/Clang
(there’s one right inside the llvm directory, and there should be at
least one more inside the Clang directory).<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Alternatively, you can invoke the compiler on the command line.
The options to do so in the MSVC are very much like those for GCC/Clang except
I think it uses / rather than – to indicate a command line switch. The
properties pages automatically generate these switches for you; for example
/Iinclude /Itools\clang\include .<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>In any case, using CMake is probably *<b>far</b>* easier. Not
only do you not have to mess with such things as include directories, it will automatically
set up the build order and other such useful tricks. In fact, some of the
clang/LLVM code is generated automatically, and it may be impossible to compile
LLVM/clang without running the scripts that generate it (which CMake does automatically,
after automatically determining what code needs to be generated).<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>InitHeaderSearch.cpp is part of clang itself, making changes
there will have no effect until you successfully compile clang. I take it you’ve
never compiled a compiler before?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Chris<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> cfe-dev-bounces@cs.uiuc.edu
[mailto:cfe-dev-bounces@cs.uiuc.edu] <b>On Behalf Of </b>kalyan ponnala<br>
<b>Sent:</b> Thursday, 25 February 2010 4:37 PM<br>
<b>To:</b> cfe-dev@cs.uiuc.edu<br>
<b>Subject:</b> [cfe-dev] How to tell the preprocessor where it can find its
header files ?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Hello,<br>
<br>
I am using llvm/clang solution file generated by visual studio. When I say --
"Clang-test"  -- > Set as Start-up Project -> build. I
generates a bunch of errors saying it cant find <br>
the include files stdio.h, stdlib.h, limits.h. Now how can I tell the
preprocessor where it can find its header files. Do I have to add some commands
to the visual studio or Do I have to change the helper class
"InitHeaderSearch" inside the InitHeaderSearch.cpp of the
clangFrontend target. If I have to modify the code then can an expert guide me
through the modifications that have to be made.<br>
<br>
Thanks.<br clear=all>
<br>
-- <br>
Kalyan Ponnala<br>
phone: 8163772059<o:p></o:p></p>

</div>

</body>

</html>