Is there way...?

B

BekTek

Hi all..
Is there a way taking the preprocessed output?
Some large libraries has huge #ifden .. #endif clauses..
It gets so hard to read.
I would be easier if take the clauses out...
 
R

Rob Williscroft

BekTek wrote in in comp.lang.c++:
Hi all..
Is there a way taking the preprocessed output?
Some large libraries has huge #ifden .. #endif clauses..
It gets so hard to read.
I would be easier if take the clauses out...

Usually your compiler will have an option to just "preprocess"
its input often this is a -E option that either writes the
preprocessed output to stdout or to a file. Check you compilers
documentation or help (-h, -?, --help maybe).

Note it doesn't really make the code esier to read as you'll often
get a huge file with a lot of blank lines in it, and macro's expanded
on one huge line.

But at least you get see exactly what the compiler gets to see with
all the stuff it ignores removed.

HTH.

Rob.
 
M

Marc Cromme

Hi all..
Is there a way taking the preprocessed output?
Some large libraries has huge #ifden .. #endif clauses..
It gets so hard to read.
I would be easier if take the clauses out...

Depends on the compiler used - with g++, look for the -E option in th
manual pages.

This is not C++ specific, however, and you should inquire on a list
dedicated to your development environment.

Cheers, Marc Cromme
 

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,181
Messages
2,570,970
Members
47,536
Latest member
VeldaYoung

Latest Threads

Top