How do I compile code using Clang with the MinGW C/C++ Library? (Particular issue with float.h) : <p>I have a simple program which I can successfully compile with clang, using MinGW's C/C++ Library:</p>

<pre><code>#include &lt;stdio.h&gt;
int main(int argc, char **argv) { printf("Hello world!\n"); return 0; }
</code></pre>

<p>I am able to compile this with mingw-gcc successfully:</p>

<pre><code> $ gcc test.c -o test
 $ ./test
 Hello world!
</code></pre>

<p>I am also able to compile it successfully using clang+mingw:</p>

<pre><code> $ clang test.c -o test -target
 $ ./test
 Hello world!
</code></pre>

<p>However, if I make a small change to my program (include float.h), it continues to compile with gcc but no longer compiles with clang:</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;float.h&gt;
int main(int argc, char **argv) { printf("Hello world!\n"); return 0; }
</code></pre>

<pre><code> $ gcc test.c -o test
 $ ./test
 Hello world!

 $ clang test.c -o test -target x86_64-pc-windows-gnu
 In file included from test.c:2:
 In file included from C:\llvm\built\lib\clang\8.0.0\include\float.h:45:
 C:\mingw64-8.1.0\x86_64-w64-mingw32\include\float.h:28:15: fatal error: 'float.h' file not found
 #include_next &lt;float.h&gt;
               ^~~~~~~~~
 1 error generated.
</code></pre>

<p>Is there some configuration issue with clang or some missing command line argument? Googling around a bit, it appears that the order of paths when including float.h is important, but this is all supposed to be handled internally by the clang driver. </p>
