[cfe-dev] 'Header file not found' error during clang source to source transformation

Nikola Smiljanic popizdeh at gmail.com
Thu Jun 19 15:12:12 PDT 2014


I think you need a compilation database for that
http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html. Header search is
done by the driver when you compile code, but there's no driver if you
invoke the front-end directly (or if you're using tooling).


On Fri, Jun 20, 2014 at 5:46 AM, Sandeep K Chaudhary <
babbusandy2006 at gmail.com> wrote:

> Hi guys,
>
> I am doing some basic source to source transformation by iterating through
> the AST using Clang front-end. And, it is working fine i.e. I am able to
> get transformed code with insertions.
>
> However, when I have some header file inclusions in the input source code
> such as "#include<stdio.h", it produces an error message when transforming
> the code. It is -
>
> *input.c:1:9: fatal error: 'stdio.h' file not found*
> *#include<stdio.h>*
> *        ^*
> So my question is - how can I avoid getting this error about header files?
> For all practical use, my input source files will have the header files.
> Please let me know.
>
> Thanks and regards,
> Sandeep.
>
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140620/55b55234/attachment.html>


More information about the cfe-dev mailing list