<div dir="ltr">I'd run your normal build in verbose mode, and compare the command lines you get to what you find in compile_commands.json.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 4, 2013 at 3:48 AM, rayjcwu <span dir="ltr"><<a href="mailto:rayjcwu@gmail.com" target="_blank">rayjcwu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I change my target to gnu tools. Taking wget for example, I could build it by<br>
clang and I use Bear <<a href="https://github.com/rizsotto/Bear" target="_blank">https://github.com/rizsotto/Bear</a>> to generate<br>
compile_commands.json.<br>
When I use my code<br>
<<a href="https://github.com/rayjcwu/clang.libtooling.annotator/blob/master/main.cpp" target="_blank">https://github.com/rayjcwu/clang.libtooling.annotator/blob/master/main.cpp</a>><br>
, which does nothing meanful except visiting, to visit all ast nodes in<br>
source code, I will get a lot of header files not found error.<br>
But I could use sourceweb <<a href="https://github.com/rprichard/sourceweb" target="_blank">https://github.com/rprichard/sourceweb</a>> , which<br>
is listed on exteral clang projects, to parse wget with the same .json file<br>
without any trouble. Even if I change my llvm/clang to version 3.2 the error<br>
still exists.<br>
<br>
Is there any quick possible solution for that before I tracing sourceweb<br>
source code?<br>
<br>
======<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/src/init.c.<br>
glthread/threadlib.c:19:10: fatal error: 'config.h' file not found<br>
#include <config.h><br>
^<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/lib/glthread/threadlib.c.<br>
In file included from ftp-basic.c:32:<br>
./wget.h:40:10: fatal error: 'config.h' file not found<br>
#include "config.h"<br>
^<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/src/ftp-basic.c.<br>
futimens.c:19:10: fatal error: 'config.h' file not found<br>
#include <config.h><br>
^<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/lib/futimens.c.<br>
stripslash.c:19:10: fatal error: 'config.h' file not found<br>
#include <config.h><br>
^<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/lib/stripslash.c.<br>
dup-safer-flag.c:21:10: fatal error: 'config.h' file not found<br>
#include <config.h><br>
^<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/lib/dup-safer-flag.c.<br>
In file included from html-parse.c:92:<br>
./wget.h:40:10: fatal error: 'config.h' file not found<br>
#include "config.h"<br>
^<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/src/html-parse.c.<br>
In file included from http.c:32:<br>
./wget.h:40:10: fatal error: 'config.h' file not found<br>
#include "config.h"<br>
^<br>
1 error generated.<br>
Error while processing /home/jcwu/repos/wget-1.14/src/http.c.<br>
In file included from recur.c:32:<br>
./wget.h:40:10: fatal error: 'config.h' file not found<br>
#include "config.h"<br>
^<br>
1 error generated.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://clang-developers.42468.n3.nabble.com/How-to-use-libtooling-to-parse-multiple-files-at-once-and-succesfully-find-stddef-h-tp4035389p4035587.html" target="_blank">http://clang-developers.42468.n3.nabble.com/How-to-use-libtooling-to-parse-multiple-files-at-once-and-succesfully-find-stddef-h-tp4035389p4035587.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Clang Developers mailing list archive at Nabble.com.<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div>