I installed LLVM and Clang-3.9.0 on Win10. I also installed MinGW.
I put my C code in the "D:" drive.
I can use gcc and g ++ to compile my code. But when I use clang, I get:
clang -cc1 version 3.9.0 based upon LLVM 3.9.0 default target x86_64-pc-windows-msvc ignoring duplicate directory "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A" ignoring duplicate directory "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A" #include "..." search starts here: #include <...> search starts here: C:\Program Files\LLVM\bin\..\lib\clang\3.9.0\include C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A End of search list. hello.c:1:10: fatal error: 'stdio.h' file not found #include "stdio.h" ^ 1 error generated.
How can I use gcc and g ++, my environment variable settings are right. But then I can not get clang to look into C: \ MinGW.
I tried to copy all MinGW folders manually to C:\Program Files\LLVM\bin\ and \lib\clang\3.9.0\include separately, but this did not work. I wanted to try this one , but in 3.9.0 I cannot find clang/lib/Frontend/InitHeaderSearch.cpp .
Anyway, is there any work around?
Note. I tried <stdio.h> and "stdio.h" both, and I still get the same error.
source share