Recent

Author Topic: {$IF DEFINED(ELSE_THAN_LCL)} ?  (Read 5508 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3939
    • StrumPract is the musicians best friend
{$IF DEFINED(ELSE_THAN_LCL)} ?
« on: January 06, 2014, 12:54:12 pm »
Hello.  ;)

Before to ask it to fpc-forum, i would ask it to Lazarus people if they will agree, if some more definitions where added for fpc compiler.

Now, "LCL", "Qt", "win32", "GTK" and all other sub-LCL are default definitions for fpc compiler.

I would be very happy if 2 more declarations where added, by default, in the compiler.

I think that it is time now to make "fpgui" and "msei" part of declarations too.

Thanks for your cool answers. ;)

« Last Edit: January 07, 2014, 08:15:03 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12894
  • FPC developer.
Re: {$IF DEFINED(ELSE_THAN_LCL)} ?
« Reply #1 on: January 06, 2014, 02:02:51 pm »
Now, "LCL", "Qt", "Carbon", "GTK" and all other sub-LCL are default definitions for fpc compiler.

No, they are not. They are defines of Lazarus, passed by Lazarus to the compiler depending on its internal settings.

Quote
I would be very happy if 2 more declarations where added, by default, in the compiler.

I think that it is time now to make "fpgui" and "msei" part of declarations too.

Then fpgui's IDE and MSEI's IDE should set them.

Fred vS

  • Hero Member
  • *****
  • Posts: 3939
    • StrumPract is the musicians best friend
Re: {$IF DEFINED(ELSE_THAN_LCL)} ?
« Reply #2 on: January 06, 2014, 06:35:03 pm »
Quote
No, they are not. They are defines of Lazarus, passed by Lazarus to the compiler depending on its internal settings.

Then fpgui's IDE and MSEI's IDE should set them.

Extremely happy to read that:  ;)

I apologize about bad suspicion.  :-[

Many thanks.
« Last Edit: January 06, 2014, 06:42:41 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3939
    • StrumPract is the musicians best friend
Re: {$IF DEFINED(ELSE_THAN_LCL)} ?
« Reply #3 on: January 07, 2014, 08:03:14 pm »
Hum, i m sure you will think im the the most annoying guy in the world (and you are not the only one  :-X ), but...

There is something that still disturb me...  :-[

I have noted that in new fpc 2.7.1, console is defined... ( i have to change part of my code cause i used that console define for something else... :-X)

And i have noted also that if i use {$IF DEFINED(console)}, fpc can do distinction between console application and LCL application.

So, last question for today :  What does defined-console, what does it check ?

Many thanks.
« Last Edit: January 07, 2014, 08:16:46 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12894
  • FPC developer.
Re: {$IF DEFINED(ELSE_THAN_LCL)} ?
« Reply #4 on: January 07, 2014, 08:42:54 pm »
I have noted that in new fpc 2.7.1, console is defined... ( i have to change part of my code cause i used that console define for something else... :-X)

Console has been reserved by Delphi since d1 afaik.

Quote
And i have noted also that if i use {$IF DEFINED(console)}, fpc can do distinction between console application and LCL application.

To console and not console. This is mainly important on Windows where this difference is annotated in the binary. But in *nix it can be used too to avoid opening an extra console/tty.

Quote
So, last question for today :  What does defined-console, what does it check ?

On Windows, see parameter -WG
Many thanks.
[/quote]

Fred vS

  • Hero Member
  • *****
  • Posts: 3939
    • StrumPract is the musicians best friend
Re: {$IF DEFINED(ELSE_THAN_LCL)} ?
« Reply #5 on: January 07, 2014, 08:50:00 pm »
@ Marcov : many thanks.

PS : Aaargh, i have a other question, i promise not to ask anymore today, so see you tomorrow...  ;)
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018