Compile-listing

Bob Plantz plantz@cds1.net
Sun Aug 29 19:55:00 GMT 2010


  On 8/29/2010 8:15 AM, Franz Edler wrote:
> Hi all,
>
> a simple question to experts:
>
> When I compile a module containing a lot of #include statements and I want
> to know where (in which of the included modules) a specific function is
> defined, how can I easily get this information?
> Is there something like a cross-reference listing of the externals?
> If yes, how to produce such a listing? Is there a compile-option for this?
>
> Best regards
> Franz
Yes, use the -E option. Note that this sends the results to standard output, typically your screen.

See gcc.gnu.org/onlinedocs/gcc/Option-Summary.html for a summary of options.

By the way, #include statements are typically used to include header files. Header files should have only function prototypes, not function definitions. A web search will bring up several sources of explanation of the differences between the two.

--Bob




More information about the Gcc-help mailing list