I decided to play with Clang on Windows this morning, using the pre-compiled binaries. However, when I try to compile a hello world app, I get this error message:
fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
Googling didn't help me figure out where to get the standard library for c. But, when I did clang --verbose hello.c, I got a hint:
...
ignoring nonexistent directory "c:/mingw/include"
...
So, I installed MinGW (and its mingw32-base and mingw32-gcc-g++ packages). Now, I have that directory, and have a standard library for C that Clang can use, along with a ton of useful utilities. I then added the C:\MinGW\bin directory to my path.
Thank you, this post helped me! :)
ReplyDeleteThis solved my three hour problem.
ReplyDeleteThank you very much! I had googled the world but no help. You save me!
ReplyDeleteThanks for the help!!!
ReplyDelete