🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.commandlinetools
Article #215

Re: Having trouble with conditional compiling

#215
From: Antti Kurenniemi
Date: Wed, 16 Mar 2005 19:20
50 lines
2781 bytes
Aw, that's not cool :-(   Anyway, thanks for your reply, I would never have 
figured that out by myself. Any hints about the include file thingie - I've 
never used the command line compiler, so I'm a bit lost with all the 
tidbits, and it's not too generously documented.

Thanks again,
Antti Kurenniemi

"Brandon Smith" <redwoodtwig@yahoo.com> wrote in message 
news:Xns961B45B26CD75Brandonsynaturecom@207.105.83.66...
> 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: <423886df$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.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
References: <42343d5f@newsgroups.borland.com> <Xns961B45B26CD75Brandonsynaturecom@207.105.83.66>

Show Full Headers
Complete Article Headers
X-Google-Thread: ff8f1,f58e0ba947983a18
X-Google-Attributes: gidff8f1,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Antti Kurenniemi" <NOantti@SPAManttikPLEASE.com>
Newsgroups: borland.public.delphi.commandlinetools
References: <42343d5f@newsgroups.borland.com> <Xns961B45B26CD75Brandonsynaturecom@207.105.83.66>
Subject: Re: Having trouble with conditional compiling
Date: Wed, 16 Mar 2005 21:20:05 +0200
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 62.142.70.243
Message-ID: <423886df$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1111000799 62.142.70.243 (16 Mar 2005 11:19:59 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.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