Using cpp to expand macros (was: Re: bug in the class browser)
holle at almaden.ibm.com
holle at almaden.ibm.com
Thu Jun 17 19:57:09 BST 1999
Please remember that the cpp puts the line number information in there as "#line
<number>" and such. You may want to add the parameter -P to the cpp command as
well as the -C switch in order to keep the comments in place. The same two
sitches (-P -C) work for gcc, too.
-holger
Jonas Nordin <jonas.nordin at cenacle.se> on 17/06/99 00:56:27
Please respond to kdevelop at fara3.cs.uni-potsdam.de
To: kdevelop at fara3.cs.uni-potsdam.de
cc: (bcc: Holger Lehmann/Almaden/Contr/IBM)
Subject: Re: bug in the class browser
> > I have had the same thoughts as well. I haven't really tested it though.
What I
> > really want is just to have the macros expanded. Anyone know of a way to do
> > that?
>
> Hi!
>
> Invoking cpp with -dM option, you get a list of #define statements
> concerning all macros, even ones defined in included headers. I think
> this should be useful for you...
Wieeeha! Thanks a million!
I guess you could first do that and then do a g++ -E on that file to expand the
macros....
If this works it will solve a lot of problems!
/J
More information about the KDevelop
mailing list