combine "include files" in one

  • Thread starter Thread starter Kayıhan
  • Start date Start date
K

Kayıhan

i wonder ,is it possible to see all include files (used in a project) in one
file.
i mean also if a define statement neglates the other, i dont want to see it
in the file.
i just want to see what is what, simple and together
Thanks for answers
 
You can always use /P on the command line to preprocess the source file
to a file. This will go through all the prepocessor steps (substituting
macros, including files, skipping parts of includes, etc). By forwearned -
the output file can be quite large, particularly if you include something
like windows.h
Bob
 
Bob said:
You can always use /P on the command line to preprocess the source
file to a file. This will go through all the prepocessor steps
(substituting macros, including files, skipping parts of includes,
etc). By forwearned - the output file can be quite large,
particularly if you include something like windows.h
Bob

gcc does a little better:

Try
g++ -MP -P source.cpp
 
Kayıhan said:
i wonder ,is it possible to see all include files (used in a project) in
one
file.
i mean also if a define statement neglates the other, i dont want to see
it
in the file.
i just want to see what is what, simple and together
Thanks for answers

If you want to see which files are included for a given source file, you
want to add the "/showIncludes" switch to the command line. This can be
done either for the whole project or just for a specific *.cpp file(s).

If you are asking how to combine common include files to somehow reduce your
apparent lines of code, you probably want to add most of your include files
to stdafx.h and do some basic research on "precompiled headers". You
generally don't want to add any of your own header files to stdafx.h.
 
Back
Top