[cfe-dev] clang -cc1 error : file not found

汪雷 wangcppclei at gmail.com
Thu Mar 19 01:14:16 PDT 2015


Hi, everyone!
I have a simple source file test.c,as follow:
># include<stdio.h>
>int main() {
>  printf("Hello World\n");
>  return 0;
>}

When I use command:$ clang test.c -o test .It's OK, and generate the test
executable.
But, when use command:$ clang test.c -cc1 test.c -o test  or command:$clang
-cc1 test.c -ast-print .Error occur.
:test.c:1:9: fatal error: 'stdio.h' file not found

The office docments say that:"Users should not run clang -cc1 directly,
because -cc1 options are not guaranteed to be stable"  from:
http://clang.llvm.org/docs/FAQ.html
Now I want to print the ast..
The platform is ubuntu14.04, LLVM version is 3.6, the same to 3.5.
I want to print the ast. Is there anyone can help me? Thinks very much^.^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150319/473c384a/attachment.html>


More information about the cfe-dev mailing list