Re: [Lazarus] Where to define conditionals for FPC

2020-05-16 Thread Marc Weustink via lazarus
On 15-5-2020 23:54, Bo Berglund via lazarus wrote: On Fri, 15 May 2020 21:26:43 +0200, Marc Weustink via lazarus wrote: On May 14, 2020 10:21:22 AM GMT+02:00, Bo Berglund via lazarus wrote: On Tue, 12 May 2020 13:49:08 +0200, Marc Weustink via lazarus wrote: While going through your

Re: [Lazarus] Where to define conditionals for FPC

2020-05-15 Thread Bo Berglund via lazarus
On Fri, 15 May 2020 21:26:43 +0200, Marc Weustink via lazarus wrote: > > >On May 14, 2020 10:21:22 AM GMT+02:00, Bo Berglund via lazarus > wrote: >>On Tue, 12 May 2020 13:49:08 +0200, Marc Weustink via lazarus >> wrote: >> >>While going through your post I got into this section: >> 3)

Re: [Lazarus] Where to define conditionals for FPC

2020-05-15 Thread Marc Weustink via lazarus
On May 14, 2020 10:21:22 AM GMT+02:00, Bo Berglund via lazarus wrote: >On Tue, 12 May 2020 13:49:08 +0200, Marc Weustink via lazarus > wrote: > >While going through your post I got into this section: > >>> 3) Compiling same code with Delphi and FPC? >>> Do you convert your projects (manually)

Re: [Lazarus] Where to define conditionals for FPC

2020-05-14 Thread Bo Berglund via lazarus
On Tue, 12 May 2020 13:49:08 +0200, Marc Weustink via lazarus wrote: While going through your post I got into this section: >> 3) Compiling same code with Delphi and FPC? >> Do you convert your projects (manually) to make it possible to use >> both Delphi and Lazarus as the IDE for further work

Re: [Lazarus] Where to define conditionals for FPC

2020-05-13 Thread Bo Berglund via lazarus
On Tue, 12 May 2020 13:49:08 +0200, Marc Weustink via lazarus wrote: > > >On 11-5-2020 09:33, Bo Berglund via lazarus wrote: >> On Sun, 10 May 2020 14:37:12 +0200, Marc Weustink via lazarus >> wrote: >> >>> The last weeks, since I'm working from home, I've been converting a lot >>> of our

Re: [Lazarus] Where to define conditionals for FPC

2020-05-12 Thread Marco van de Voort via lazarus
Op 2020-05-11 om 18:19 schreef Bo Berglund via lazarus: And do I put the include in the beginning of every unit source file before or after the interface keyword? I always put it after the interface word. -- ___ lazarus mailing list

Re: [Lazarus] Where to define conditionals for FPC

2020-05-12 Thread Marc Weustink via lazarus
On 11-5-2020 09:33, Bo Berglund via lazarus wrote: On Sun, 10 May 2020 14:37:12 +0200, Marc Weustink via lazarus wrote: The last weeks, since I'm working from home, I've been converting a lot of our Delphi 6 projects. I only use the convertor to get a Lazarus project from a dpr. All other

Re: [Lazarus] Where to define conditionals for FPC

2020-05-11 Thread Bo Berglund via lazarus
On Mon, 11 May 2020 11:56:32 +0200, Marco van de Voort via lazarus wrote: > >Op 2020-05-11 om 09:33 schreef Bo Berglund via lazarus: >> and: >> >> >> > >Versions defines are not portable anyway. Long time ago, I wrote >something for Jedi about it, which I later upgraded with

Re: [Lazarus] Where to define conditionals for FPC

2020-05-11 Thread Marco van de Voort via lazarus
Op 2020-05-11 om 09:33 schreef Bo Berglund via lazarus: and: Versions defines are not portable anyway. Long time ago, I wrote something for Jedi about it, which I later upgraded with some general Delphi-FPC advise. Though outdated, it might still be a good read:

Re: [Lazarus] Where to define conditionals for FPC

2020-05-11 Thread Juha Manninen via lazarus
On Fri, May 8, 2020 at 7:03 PM Bo Berglund via lazarus wrote: > > All of this works OK in Delphi 2007 when I use the GUI to set the > conditional variables. You must have separate projects for Delphi and Lazarus in any case. Maintaining those variables in the Delphi project should not be a

Re: [Lazarus] Where to define conditionals for FPC

2020-05-11 Thread Bo Berglund via lazarus
On Sun, 10 May 2020 14:37:12 +0200, Marc Weustink via lazarus wrote: >The last weeks, since I'm working from home, I've been converting a lot >of our Delphi 6 projects. I only use the convertor to get a Lazarus >project from a dpr. All other changes I revert. The convertor breaks >more than

Re: [Lazarus] Where to define conditionals for FPC

2020-05-10 Thread Marc Weustink via lazarus
On May 8, 2020 6:03:00 PM GMT+02:00, Bo Berglund via lazarus wrote: >On Fri, 8 May 2020 17:19:30 +0200, Sven Barth via lazarus > wrote: > >>Such an include file would need to be included in all units where a >define >>might be needed. >> >>Alternatively if you always use LazSerial for

Re: [Lazarus] Where to define conditionals for FPC

2020-05-08 Thread Bo Berglund via lazarus
On Fri, 8 May 2020 19:51:25 +0200, Sven Barth via lazarus wrote: >However Delphi does not define a DELPHI define, so you'll have to use a >negated check for FPC instead. In your example: > >{$IFNDEF FPC} > {$IFDEF USE_SUPERPRO} >Sentinel, > {$ENDIF} >{$ENDIF} > Thanks, I will use that

Re: [Lazarus] Where to define conditionals for FPC

2020-05-08 Thread Sven Barth via lazarus
Bo Berglund via lazarus schrieb am Fr., 8. Mai 2020, 18:03: > Maybe I can just enclose the ifdef's in an outer layer ifdef DELPHI? > Does the converter skip such sections during the conversion? > Like: > > {$IFDEF DELPHI} > {$IFDEF USE_SUPERPRO} > Sentinel, > {$ENDIF} > {$ENDIF} > > Then

Re: [Lazarus] Where to define conditionals for FPC

2020-05-08 Thread Bo Berglund via lazarus
On Fri, 8 May 2020 17:19:30 +0200, Sven Barth via lazarus wrote: >Such an include file would need to be included in all units where a define >might be needed. > >Alternatively if you always use LazSerial for FPC/Lazarus you could simply >check with "$ifdef FPC" instead. Well LazSerial was just

Re: [Lazarus] Where to define conditionals for FPC

2020-05-08 Thread Sven Barth via lazarus
Bo Berglund via lazarus schrieb am Fr., 8. Mai 2020, 16:54: > On Fri, 8 May 2020 16:34:49 +0200, Gabor Boros via lazarus > wrote: > > >2020. 05. 08. 14:07 keltezéssel, Bo Berglund via lazarus írta: > >> I know that you can define "custom options" in Lazarus > >>

Re: [Lazarus] Where to define conditionals for FPC

2020-05-08 Thread Bo Berglund via lazarus
On Fri, 8 May 2020 16:34:49 +0200, Gabor Boros via lazarus wrote: >2020. 05. 08. 14:07 keltezéssel, Bo Berglund via lazarus írta: >> I know that you can define "custom options" in Lazarus >> Project/Options/CompilerOptions/CustomOptions/Defines >> >> These can then be used in constructs like

Re: [Lazarus] Where to define conditionals for FPC

2020-05-08 Thread Gabor Boros via lazarus
2020. 05. 08. 14:07 keltezéssel, Bo Berglund via lazarus írta: I know that you can define "custom options" in Lazarus Project/Options/CompilerOptions/CustomOptions/Defines These can then be used in constructs like this example: {$IFDEF USE_LAZSERIAL} //Code pertaining to LazSerial {$ELSE}

[Lazarus] Where to define conditionals for FPC

2020-05-08 Thread Bo Berglund via lazarus
I know that you can define "custom options" in Lazarus Project/Options/CompilerOptions/CustomOptions/Defines These can then be used in constructs like this example: {$IFDEF USE_LAZSERIAL} //Code pertaining to LazSerial {$ELSE} //Code pertaining to AsyncPro {$ENDIF} But if I do not want to use