Header file inclusion
I have huge C code base. There is a header file which is included in multiple C files. How do I know where is the header file included for the first time?
|
it has no meaning, it depends on the target you want to create. But you can remove/rename that include file and the first error message complaining about it is the answer.
|
Some languages "know" whether or not a particular header file is included; others do not.
In many "C" header files you will therefore see this: (e.g. in the imaginary file, xyzzy.h): Code:
#ifndef HEADER_XYZZY_INCLUDED It is a cumbersome mechanism, and this why other languages provide a require or use construct (your keyword may vary...) with a more powerful semantics. |
All times are GMT -5. The time now is 01:44 PM. |