Note that there are some explanatory texts on larger screens.

plurals
  1. POClang and C++11 headers
    primarykey
    data
    text
    <p>I'm trying to get Clang to work on Windows, to eventually develop with Qt Creator to see if it's a viable alternative to Visual Studio.</p> <p>I got LLVM and Clang 3.2 (SVN Revision 163238) to compile using <a href="http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/" rel="noreferrer">MinGW w64</a> (mingw-w64-bin_i686-mingw_20111220.zip) and also pointed to gcc's C++ header directories by adding <code>AddMinGWCPlusPlusIncludePaths("D:/Code/mingw/lib/gcc", "x86_64-w64-mingw32", "4.7.0");</code> to <code>clang/lib/Frontend/InitHeaderSearch.cpp</code>, although I think that might not be the most up-to-date method. Anyway, Clang seems to find most of those headers.</p> <p>However, when compiling a simple Hello World:</p> <pre><code>#include &lt;iostream&gt; int main(int argc, char* argv[]) { std::cout &lt;&lt; "test\n"; return 0; } </code></pre> <p>using <code>clang++ main.cpp</code> I get this error:</p> <pre><code>In file included from main.cpp:1: In file included from D:/Code/mingw/lib/gcc/x86_64-w64-ming32/4.7.0./include/c++\iostream:39: In file included from D:/Code/mingw/lib/gcc/x86_64-w64-ming32/4.7.0./include/c++\ostream:39: In file included from D:/Code/mingw/lib/gcc/x86_64-w64-ming32/4.7.0./include/c++\ios:39: In file included from D:/Code/mingw/lib/gcc/x86_64-w64-ming32/4.7.0./include/c++\iosfwd:41: In file included from D:/Code/mingw/lib/gcc/x86_64-w64-ming32/4.7.0./include/c++\postypes.h:41: D:/Code/mingw/lib/gcc/x86_64-w64-ming32/4.7.0./include/c++\cwchar:45:10: fatal error: 'wchar.h' file not found </code></pre> <p>So, Clang apparently finds several C++ headers including <code>iostream</code> but fails to find <code>wchar.h</code>. Turns out that <code>wchar.h</code> is located in <code>.../include/c++\tr1</code> where Clang doesn't look for it. Moving those TR1 headers up one directory doesn't help either.</p> <p>What did I do wrong here? Is the gcc C++ library not compatible with Clang, since apparently it still hasn't integrated some TR1 libraries into the standard? Where could I get a compatible C++11 library for Clang (for Windows!)?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload