0

I recently installed include-what-you-use (IWYU) to try it out. I am on version include-what-you-use 0.12 based on clang version 9.0.1-10. (My OS is Ubuntu 20.04 on WSL1)

I tried to do a very simple example on a source code file, but it quickly comes back as an error on the very first include? (Which is just a c standard library file)

After running

include-what-you-use myutils.cpp:

In file included from myutils.cpp:8:
In file included from ./myutils.h:11:
/usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cfloat:42:10: fatal error: 'float.h' file not found
#include <float.h>
^~~~~~~~~

Why is it error'ing out on a c standard library include?

I cannot post the entire source here, and without extensive testing I am not sure what minimal example would cause this problem.

Am I just mis-using IWYU? I installed it via apt rather than building it and llvm/clang/etc from scratch. Is that fine?

Tyler Shellberg
  • 1,086
  • 11
  • 28
  • Have you already set the path correcctly and updated the required environment variables? – Itachi Uchiwa May 20 '22 at 20:29
  • @ItachiUchiwa No, I did not. What changes need to be made? (The installation instructions are a little unclear. There's no section for package manager users, and most of the path changes seem to be related to those using cmake, which I'm not trying to do) – Tyler Shellberg May 20 '22 at 20:58

0 Answers0