<div dir="ltr"><div><div>Ah, thanks. I'll `cinst mingw` when I get to my Windows machine, and try compiling again.<br><br></div>Could we improve this error message? For missing stdlib headers, clang.exe could say:<br><br>
</div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Standard libraries not found. Please install standard libraries from either Visual Studio or MinGW:<br>
<br><a href="http://www.visualstudio.com">http://www.visualstudio.com</a><br><a href="http://chocolatey.org/packages/mingw">http://chocolatey.org/packages/mingw</a><br></blockquote><div> </div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Nov 20, 2013 at 1:32 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Clang doesn't ship with its own complete toolchain.  It always integrates with whatever standard C/C++ libs and headers the native platform uses.<div><br></div><div>On Windows, there are two toolchains worth mentioning: the Visual C++ toolchain, and the Mingw toolchain.</div>

<div><br></div><div>If you want to build using make, etc, then you probably want to install mingw.  Then you can build with something like "clang --target=i686-pc-mingw32" and it should pick the right headers for you.</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Wed, Nov 20, 2013 at 8:43 AM, Andrew Pennebaker <span dir="ltr"><<a href="mailto:andrew.pennebaker@gmail.com" target="_blank">andrew.pennebaker@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>I'm trying to compile hello.c with clang.exe, but I'm getting an error about missing cstdlib headers.<div>

<br></div><div>Source:</div><div><br></div><div><a href="https://github.com/mcandre/mcandre/tree/master/c/hello/" target="_blank">https://github.com/mcandre/mcandre/tree/master/c/hello/</a></div>

<div><br></div><div>Trace:</div><div><br></div><div><font face="courier new, monospace">C:\Users\andrew\Desktop\src\mcandre\c\hello>gmake</font></div><div><font face="courier new, monospace">clang -O2 -Wall -Wextra -Wmost -Weverything -o hello hello.c</font></div>



<div><font face="courier new, monospace">hello.c:1:10: fatal error: 'stdio.h' file not found</font></div><div><font face="courier new, monospace">#include <stdio.h></font></div><div><font face="courier new, monospace">         ^</font></div>



<div><font face="courier new, monospace">1 error generated.</font></div><div><font face="courier new, monospace">gmake: *** [hello] Error 1</font></div><div><br></div><div>Do
 I need to add libs to the compile command, something like -lc? I tried a
 few variants, like -lc, -lstdlib, -lcstdlib, with no success.</div>
<div><br></div><div>System:</div><div><br></div></div><div>* clang.exe version 3.4 (trunk), from LLVM 3.4.svn, from the official LLVM <a href="http://llvm.org/builds/" target="_blank">snapshot installer</a><br></div><div>

<div>* gmake 3.82, from StrawberryPerl 5.16.3.3</div>
<div>* Windows 8.1 Professional x64</div><br></div><div>-- <br><div></div>Cheers,<div><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>
</div></div>
<br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div></div>Cheers,<div><br></div><div>Andrew Pennebaker</div><div><a href="http://www.yellosoft.us" target="_blank">www.yellosoft.us</a></div>
</div>