This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Can CPP process only one "conditional" ?
- From: adlv <amaury dot delavaissiere at inria dot fr>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 11 Jun 2008 00:47:07 -0700 (PDT)
- Subject: Can CPP process only one "conditional" ?
Hello
I want to give the source code of my software (written in C and C++), either
in a freeware version or in a shareware version.
I could put something like this in my code :
#if FREE_VERSION
âcode A...
#else
âcode B...
#endif
then source files with the "code A" part would be given with the freeware
package.
and source files with the "code B" part would be given with the shareware
package.
I am wandering if CPP can generate output files corresponding to these two
different versions of my source code. In other words I would like CPP to
process only this conditional statement (FREE_VERSION), and _only_ this one!
In other words :) I would like CPP to give the exact same output files as
it's input files, except for this specific conditional.
>From what I have read in the CPP documentation and some faqs, I don't think
CPP can do the job. But if someone here thinks it can, then it would make
mine easier :)
Thanks in advance...
--
View this message in context: http://www.nabble.com/Can-CPP-process-only-one-%22conditional%22---tp17771975p17771975.html
Sent from the gcc - Help mailing list archive at Nabble.com.