|combining c-code files into one c-code file firstname.lastname@example.org (Harald Gustafsson) (2012-04-03)|
|Re: combining c-code files into one c-code file email@example.com (Cameron McInally) (2012-04-04)|
|Re: combining c-code files into one c-code file firstname.lastname@example.org (Harald Gustafsson) (2012-04-04)|
|Re: combining c-code files into one c-code file email@example.com (Gene) (2012-04-09)|
|Re: combining c-code files into one c-code file firstname.lastname@example.org (Harald Gustafsson) (2012-04-18)|
|From:||Cameron McInally <email@example.com>|
|Date:||Wed, 4 Apr 2012 12:02:59 -0400|
|Posted-Date:||05 Apr 2012 15:19:37 EDT|
No, I do not know of any tool that will do such things automatically.
But, a tool like this is not something that would be on my radar.
I do have a small bit to add though, which may make such a tool a tall
order. One immediate issue I see is determining linkage of symbols
when consolidating the source. When handling WEAK symbols, the link
line (and potentially the characteristics of your linker), will play a
role in determining which definition should be selected for each
reference. Whether you intend to link your program statically or
dynamically muddles the issue further.
At the very least, if your program is reasonably complex, this tool
you seek would need to have knowledge about the linker that you're
using on your system.
Hope that helps!,
On Tue, Apr 3, 2012 at 9:23 AM, Harald Gustafsson
> pre-process/merge that into one c-file, managing redeclarations, conflicting
> declarations, declaration order, etc. The readability of the output is less
> important but prefers as human readable as possible.
> An alternative is to have one file scope but separate each included c-file
> into its own namespace, does C99 have any such support?
Return to the
Search the comp.compilers archives again.