public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Can CPP process only one "conditional" ?
@ 2008-06-11  7:47 adlv
  2008-06-11  8:28 ` Fabian Cenedese
  0 siblings, 1 reply; 6+ messages in thread
From: adlv @ 2008-06-11  7:47 UTC (permalink / raw)
  To: gcc-help


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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-24 17:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-11  7:47 Can CPP process only one "conditional" ? adlv
2008-06-11  8:28 ` Fabian Cenedese
2008-06-11 14:30   ` adlv
2008-06-11 14:41     ` Young, Michael
2008-07-24 19:45       ` adlv
2008-07-24 20:23         ` adlv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).