Environment: I am using MS-VC++ 6.0,
- I include a group of header file with
some data. - The header files change often, so on
every change I change the path
setting and re-compiler - A log file is generated based on the
included header files -
For tracking of the header file from
the log file, I wish to print the
header file path inside the log -
Question-1: Is getting the header
file path from inside the program
possible? - Question-2: I am using VC++, but if
it is possible in gcc, then I can
easily port, so, please let me know,
if it is possible in any other
environment like gcc
In VC++, compiling with the option
/FCwill put the currently processed file’s entire path in the__FILE__macro.That will account for your changes to the include path.
Details here.