<html><head><title>Header errors using Clang</title>
</head>
<body>
<span style=" font-family:'Courier New'; font-size: 9pt;">I just installed the 64-bit versions of Clang 3.8.1 and MinGW 5.1.0 on my 64-bit Windows 10 system. Everything seemed to install fine but I'm getting lots of errors, not warnings, on the contents of the standard header files. I first set my INCLUDE path to where my Microsoft VS 2015 headers are located, then changed it to where my mingw64 headers are located but there were content errors in both cases. In the mingw64 case the following is a typical error:<br>
<br>
C:\mingw64\x86_64-w64-mingw32\include\stdio.h:179:86: error: expected ';' after top level declarator int __cdecl __mingw_sprintf (char * __restrict__ , const char * __restrict__ , ...) __MINGW_NOTHROW;<br>
<br>
whereas in the VS2015 case the following is typical:<br>
<br>
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\limits:611:33: error: use of undeclared identifier<br>
'char16_t'<br>
template<> class numeric_limits<char16_t><br>
<br>
I also tried the -std=c++98 through -std=c++14 switches to no avail. The respective headers work fine with the gcc and cl compilers. Is there some other set of headers I should be using that is specifically tailored to Clang itself or am I simply doing something wrong?<br>
<br>
The file I am compiling is named test.cpp and it merely contains:<br>
<span style=" font-family:'Consolas'; font-size: 10pt; color: #808080;">#include <span style=" color: #a31515;"><iostream><br>
<span style=" color: #0000ff;">int<span style=" color: #000000;"> main()<br>
{<br>
std::cout <span style=" color: #008080;"><< <span style=" color: #a31515;">"Hello world!\n"<span style=" color: #000000;">;<br>
<span style=" color: #0000ff;">return<span style=" color: #000000;"> 0;<br>
}<br>
<br>
<span style=" font-family:'Courier New'; font-size: 9pt;">The command line I am using is: clang++ -c test.cpp<br>
<br>
Thanks,<br>
Ray</body></html>