title: Clang on Windows
body: <p>First of all, I've followed <a href="http://clang.llvm.org/get_started.html" rel="noreferrer">"Getting Started: Building and Running Clang"</a>. In particular, I've built it according to "Using Visual Studio" section. In other words, I've built it using Visual Studio 2010.</p>
  
  <p>Secondly, I've manually set include and library paths to MinGW distribution:</p>
  
  <p><img src="https://i.stack.imgur.com/qzw8D.png" alt="enter image description here"></p>
  
  <p>The simple program I'm trying to compile:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main() {
      cout &lt;&lt; "Hello, World!" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>I get the following feedback from the compiler:</p>
  
  <pre><code>In file included from C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\iostream:39:
  In file included from C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\ostream:39:
  In file included from C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\ios:38:
  In file included from C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\iosfwd:41:
  In file included from C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\bits/postypes.h:41:
  C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\cwchar:144:11: error: no member named 'fgetws' in the global namespace
    using ::fgetws;
          ~~^
  C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\cwchar:146:11: error: no member named 'fputws' in the global namespace
    using ::fputws;
          ~~^
  C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\cwchar:150:11: error: no member named 'getwc' in the global namespace
    using ::getwc;
          ~~^
  C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\cwchar:151:11: error: no member named 'getwchar' in the global namespace
    using ::getwchar;
          ~~^
  C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\cwchar:156:11: error: no member named 'putwc' in the global namespace
    using ::putwc;
          ~~^
  C:\MinGW\lib\gcc\mingw32\4.5.2\include\c++\cwchar:157:11: error: no member named 'putwchar' in the global namespace
    using ::putwchar;
          ~~^
  6 errors generated.
  Build error occurred, build is stopped
  Time consumed: 646  ms.  
  </code></pre>
  
  <p>The obvious question is - why do I get this?</p>
  
  <p>Additionally, I would like to know more details, and since, Clang website provides extremely brief information - I thought that somebody could clarify the following questions to me:</p>
  
  <ol>
  <li>As far as I understand Clang does not have its own standard library (stdc++ I guess, isn't it?). That's why I have to use MinGW's headers and libraries - am I right?</li>
  <li>What is the difference between building Clang with Visual Studio and MinGW?</li>
  <li>Do I have to hard-code include paths in <code>clang/lib/Frontend/InitHeaderSearch.cpp</code> or I can skip it and rather specify those paths later through "-I" option as I do in the screenshot above?</li>
  </ol>