Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

/show include equivalent option in g++


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)?

like image 314
kumar_m_kiran Avatar asked Dec 18 '10 16:12

kumar_m_kiran


People also ask

What is the GCC option?

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.

What is G ++ command?

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.

Does the order of compiler flags matter?

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.


1 Answers

gcc -H

will print the names of header files as they are used.

like image 90
Bulletmagnet Avatar answered Oct 13 '22 16:10

Bulletmagnet