How to tell where a header file is included from? How to tell where a header file is included from? c c

How to tell where a header file is included from?


g++ -H ...

will also print the full path of include files in a format which shows which header includes which


This will give make dependencies which list absolute paths of include files:

gcc  -M showtime.c

If you don't want the system includes (i.e. #include <something.h>) then use:

gcc  -MM showtime.c


Sure use

g++ -E -dI  ... (whatever the original command arguments were)