1. 7
  1.  

  2. 2

    I quickly did this because I wanted to find out the most used headers in my projects after reading an article on precompiled headers. :)

    1. 2

      Any medium size project will have headers including other headers which massively skews results. Most compilers likely provide some insight into includes: for example MSVC has /showIncludes which prints out a tree of includes for every translation unit that’s being compiled. I’d be interested in reading how this can be done with GCC or Clang. ;)

      1. 1

        It looks like Clang and GCC both have a -H option which dumps a tree of includes, seems like a much better solution than trying to grab them all manually. Will have a play around with this. Thanks for the tip!

    2. 2

      -name ‘.c’ -o name ’.h’

      can be abbreviated as

      -name ‘*.[ch]’

      You don’t need a swiss made computer for that ;)