Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-07

LCL_FULLVERSION is not recognized

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

frans

Hi.

I use Lazarus 1.6.4 (temporarely) and lazarus 1.8.4 on Windows 10. I need to use the LCL version but I can't get it to work properly. I use the following code:
  {$IFDEF LCL_FULLVERSION > 1080000}
  {$ELSE}
  {$ENDIF}
Compiling the program give me the message Warning include environment "LCL_FULLVERSION" not found in environment. But this is the way I fount on the lazarus forum.
What am I doing wrong? And where can I find a list of all Lazarus environment variables?

mvg Frans van Leeuwen M 06-51695390 --- Deze e-mail is gecontroleerd op virussen door AVG. http://www.avg.com

Reply by email

Rik van Kekem
to frans
frans wrote 12 lines
I use Lazarus 1.6.4 (temporarely) and lazarus 1.8.4 on Windows 10. I need to use the LCL version but I can't get it to work properly. I use the following code:   {$IFDEF LCL_FULLVERSION > 1080000}   {$ELSE}   {$ENDIF} Compiling the program give me the message Warning include environment "LCL_FULLVERSION" not found in environment. But this is the way I fount on the lazarus forum. What am I doing wrong? And where can I find a list of all Lazarus environment variables?

Where did you find this on the forum?
Because you shouldn't use {$IFDEF } but {$IF } (because you are using an expression)

So:
{$IF LCL_FULLVERSION > 1080000}
{$ELSE}
{$ENDIF}

If you use {$IFDEF it will check if "LCL_FULLVERSION > 1080000" is defined, which it isn't.

Also see http://www.math.uni-leipzig.de/pool/tuts/FreePascal/prog/node4.html

B.T.W. You need to include "uses lclversion" because LCL_FULLVERSION is declared there (otherwise you get a ansistring error message).

Some other constants:
http://lazarus-ccr.sourceforge.net/docs/lcl/lclversion/index-2.html

Grtz,
Rik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180712/c1d2d24b/attachment.html>

Reply by email

frans
to Rik van Kekem

It works, Thx

mvg
Frans van Leeuwen
M 06-51695390

Op 12-7-2018 om 13:43 schreef Rik van Kekem via Lazarus:

Show quoted text 39 lines
On 12-07-2018 12:51, frans via Lazarus wrote: > I use Lazarus 1.6.4 (temporarely) and lazarus 1.8.4 on Windows 10. > I need to use the LCL version but I can't get it to work properly. > I use the following code: >   {$IFDEF LCL_FULLVERSION > 1080000} >   {$ELSE} >   {$ENDIF} > Compiling the program give me the message Warning include environment > "LCL_FULLVERSION" not found in environment. But this is the way I > fount on the lazarus forum. > What am I doing wrong? And where can I find a list of all Lazarus > environment variables? > Where did you find this on the forum? Because you shouldn't use {$IFDEF } but {$IF } (because you are using an expression) So: {$IF LCL_FULLVERSION > 1080000} {$ELSE} {$ENDIF} If you use {$IFDEF it will check if "LCL_FULLVERSION > 1080000" is defined, which it isn't. Also see http://www.math.uni-leipzig.de/pool/tuts/FreePascal/prog/node4.html B.T.W. You need to include "uses lclversion" because LCL_FULLVERSION is declared there (otherwise you get a ansistring error message). Some other constants: http://lazarus-ccr.sourceforge.net/docs/lcl/lclversion/index-2.html Grtz, Rik

---
Deze e-mail is gecontroleerd op virussen door AVG. http://www.avg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180712/f302fb96/attachment-0001.html>

Reply by email