stdio.h cannot be found using Clang as a library

Hi there,

I am now trying to use Clang as a library to analyze C/C++ programs.
I encountered a problem when dealing with header files.

As you know, using clang needs my own consumer, action stuffs. And
it calls ParseAST function automatically during execution of my actions. Now the
problem happens when doing ParseAST. ParseAST cannot find out
the header file of "stdio.h", actually all header files except the ones in the
current directory.

Any solutions about this ? Thanks,

Say, we have a program as follows. After removing the header file declaration,
it works.

#include <stdio.h>
    int a;
    a = a + 1;

- Pengcheng

So that means how can I pass my default C_INCLUDE_PATH, LD_LIBRARY_PATH search paths to Clang inside ?