I see that VC++ includes an option called /show include to list you the hierarchy of include files in each translation unit. This seems to be a very helpful option - to optimise/improve the compilation time in a large scale project.
Question
Is there any equivalent option in GNU g++ compiler to get these (similar output)?
GCC is capable of preprocessing and compiling several files either into several assembler input files, or into one assembler input file; then each assembler input file produces an object file, and linking combines all the object files (those newly compiled, and those specified as input) into an executable file.
g++ command is a GNU c++ compiler invocation command, which is used for preprocessing, compilation, assembly and linking of source code to generate an executable file.
For the most part, the order you use doesn't matter. Order does matter when you use several options of the same kind; for example, if you specify -L more than once, the directories are searched in the order specified.
gcc -H
will print the names of header files as they are used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With