[LC++]Tracking header files

Torsten Rennett Torsten at Rennett.de
Thu Aug 9 18:09:21 UTC 2001


Hi Mark,

Mark Phillips wrote:
> My question is: is there any easy way of tracking
> what include files are included from where?  For
> complex programs there will be a whole hierachy
> of inclusions.  It would be nice to have some tool
> which shows you this hierachy --- does such a tool
> exist?

When using gcc you don't need another tool :-)
Just use the '-H' option ...

BTW, if you are also interested in predefined cpp macros, try this:
	echo "int main() { return 0; }" >macrotst.C
	g++ -E -dM macrotst.C

And if the C++ specific macros doesn't matter, this is sufficient:
	echo | g++ -E -dM -

Also consider using the verbose flag (-v).

Torsten

-- 
Ingenieurbuero RENNETT       -- innovative Individual-Software --
Torsten Rennett              
Ludwig-Thoma-Weg 14          E-Mail:    mailto:Torsten at Rennett.de
D-85551 Heimstetten          Telefon:             +49-89-90480538




More information about the tuxCPProgramming mailing list