Automatically discovering C dependencies

前端 未结 5 1522
野的像风
野的像风 2020-12-14 12:17

I\'m required to write documentation for my current project that lists all .c files and for each one lists every .h file which is directly or indirectly included by that fil

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 13:08

    In MSVC (2005 and 2008 at least, possibly other versions as well but not VC6) you can get the compiler to tell you all the files that were included during compilation. The output is quite verbose, but complete and fairly easy to parse with human eyes.

    In Project Settings, go to the C/C++>Advanced tab, and toggle "Show Includes," then rebuild your project from the ground up.

提交回复
热议问题