LibTooling include changement only.

Good afternoon,

Sorry for my bad english, and my stupid question, but I'm facing a big understanding issue, and I can't figure out what is wrong.

I'm new to clang tooling development, and I'm trying to create a Code Style Checker based on clang front-end.

I'm building my tool out of clang sources, with a home installation of llvm trunk (r163087).

I just copied the main of clang-check, and only change #include directives from double quotes ("") to brackets (<>) so it does compile.

But when I try to run such a program on a simple file as

// file simple.cc
#include <iostream>
int
main(int argc, char* argv[]
{
   std::cout << "Hello World" << std::endl;
   return 0;
}

I got the error stdarg.h file not found from wchar.h file when I run my program, error which does not occur when I simply run clang-check from the installation directory.

Does anyone has some idea on what is going on, and what did I do wrong ?

Many thanks in advance,

Clang is probably not finding it’s built-in includes directory. You can find it in “\lib\clang<clang version>\include”. You can also try passing the “-v” verbose flag to Clang to diagnose such issues.

Clang is probably not finding it's built-in includes directory. You can find
it in "<build folder>\lib\clang\<clang version>\include". You can also try
passing the "-v" verbose flag to Clang to diagnose such issues.

Yep. The easiest way to get tools like clang-check to find the builtin
includes is to do a $ make install for the regular clang, and then
copy the tools into the bin/ directory of the resulting installation
path.

Cheers,
/Manuel

Thanks for your help.

Thanks to you, I now have a new way to test my tool.

By the way, we've tried to document the builtin header stuff at:
http://clang.llvm.org/docs/LibTooling.html#builtin

Any feedback on how to phrase this better, or make it more
discoverable, would be appreciated (for example, what did you search
for, etc).

Cheers,
/Manuel