I got an error when checking this file:
```c++
#include <iostream>
int main()
{
std::cout << "Hi!\n";
}
```
My include-what-you-use is installed in /usr/bin. The command line I use is:
include-what-you-use a.cpp
The output is:
```
In file included from a.cpp:1:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/iostream:39:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/ostream:38:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/ios:38:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/iosfwd:40:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/bits/postypes.h:40:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/cwchar:44:
/usr/include/wchar.h:39:11: fatal error: 'stdarg.h' file not found
# include <stdarg.h>
^
a.cpp should add these lines:
a.cpp should remove these lines:
- #include <iostream> // lines 1-1
The full include-list for a.cpp:
---
```
According to [README.md](https://github.com/include-what-you-use/include-what-you-use/blob/master/README.md), my clang is installed in /usr/bin, so there should be a stdarg.h in /usr/lib/clang/3.8.1/include, and I checked, there is a stdarg.h in that directory. So what is wrong?
Environment:
- OS: Arch Linux x86_x64
- clang: 3.8.1
- gcc: 6.1.1
- include-what-you-use (from [AUR](https://aur.archlinux.org/packages/include-what-you-use/)): 0.6
That is surprising. Can you run IWYU like this to get more info on the effective search paths?
$ include-what-you-use -v -Xiwyu -v6 a.cpp
The only thing I can think of that might be the problem is that IWYU 0.6 might've been built against clang 3.8.0, not 3.8.1, but I'm not sure. The command above should dump the relevant version too.
You are right, my IWYU is built against clang 3.8.0. After a system upgrade, my clang is upgraded but I did not rebuild the IWYU, hence the problem. After rebuilding IWYU, everything seems fine now, thanks. You can close this issue now.
OK, thanks!