Tools for viewing 'translation units'?

S

Steven T. Hatton

Are there any tools (preferably available for linux) which will display the
concatanated source code representative of an entire translation unit?
Something that would simply provide a graphical representation of the
various files and how they connect would be of interest as well.
 
A

Artie Gold

Steven said:
Are there any tools (preferably available for linux) which will display the
concatanated source code representative of an entire translation unit?
Something that would simply provide a graphical representation of the
various files and how they connect would be of interest as well.

Though it is not necessary according to the standard, most compilers
provide a way to see the result of preprocessing.

<OT>
In the case of GCC, use `cpp -E <filename>'.
</OT>

HTH,
--ag
 
D

Dietmar Kuehl

Artie Gold said:
<OT>
In the case of GCC, use `cpp -E <filename>'.
</OT>

Actually, all C++ compilers I used so far support the -E flag: just add it
to the normal invokation of the C++ compiler. There is no need to use cpp
directly. Of course, this is nothing the standard prescribes...
 
N

Nils Petter Vaskinn

Are there any tools (preferably available for linux) which will display the
concatanated source code representative of an entire translation unit?
Something that would simply provide a graphical representation of the
various files and how they connect would be of interest as well.

After making all those suggestions about how C++ should be you would have
us believe you haven't read the documentation for you compiler tools?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,919
Members
47,458
Latest member
Chris#

Latest Threads

Top