Article View: borland.public.delphi.commandlinetools
Article #213Re: Having trouble with conditional compiling
From: Brandon Smith
Date: Wed, 16 Mar 2005 12:50
Date: Wed, 16 Mar 2005 12:50
39 lines
2092 bytes
2092 bytes
The -DFIRSTVERSION declaration will only apply to the .dpr file. In
order to have a conditional apply to the other files you will need to use
an include file and reference it in each file that needs it.
Wish it weren't so, but that's been my experience. If you look at the
open source suites, you'll see that's how they do it.
Brandon
"Antti Kurenniemi" <NOantti@SPAManttikPLEASE.com> wrote in
news:42343d5f@newsgroups.borland.com:
> Hello,
>
>
> I am trying to compile two different versions of an app using a batch
> file. All is working nicely, except that I can't make the conditional
> compiling work. I have
>
> -DFIRSTVERSION
>
> on the command line, and then
>
> {$IFDEF FIRSTVERSION}
> ... some code, including setting the main form's caption
> {$ENDIF}
>
> in one of the source code files, but it doesn't compile that code. I
> also have -B in the command line, to make sure everything is compiled,
> but still no go. What could be going wrong? Is the define project
> level, or source code file level, and if the latter how do I specify
> the file in which it should be turned on?
>
>
> TIA,
> Antti Kurenniemi
>
>
>
Technical Details
Message-ID:
<Xns961B45B26CD75Brandonsynaturecom@207.105.83.66>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42343d5f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: ff8f1,f58e0ba947983a18 X-Google-Attributes: gidff8f1,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: borland.public.delphi.commandlinetools Subject: Re: Having trouble with conditional compiling From: Brandon Smith <redwoodtwig@yahoo.com> References: <42343d5f@newsgroups.borland.com> Organization: synature Message-ID: <Xns961B45B26CD75Brandonsynaturecom@207.105.83.66> User-Agent: Xnews/5.04.25 NNTP-Posting-Host: 207.43.186.121 Date: 16 Mar 2005 04:50:48 -0800 X-Trace: newsgroups.borland.com 1110977448 207.43.186.121 (16 Mar 2005 04:50:48 -0800) Lines: 40 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!diablo.voicenet.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail