I am trying to "arm" compile a C file,it includes lot of header files recursively..i am trying to find the list of these header files..is there a easier way to find the list of all the header files it includes?
There are 19 header files in the Standard C Library.
The angle brackets (<>) cause the preprocessor to search for the header file in the standard place for header files on your system, usually the /usr/include directory.
Header files can include any legal C source code. They are most often used to include external variable declarations, macro definitions, type definitions, and function declarations.
You can use the GCC C preprocessor with it's option to dump a list of headers recursively included:
cpp -M
That will show you all headers included.
You will probably need to give it the roots of all include directories used in your regular build. Run it iteratively, adding more include paths until the errors stop.
The full form of this command in this usage is:
cpp -M [-I include_directory *] path_to_c_file.c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With