[Lazarus] Compile conditionals from Delphi do not work in Laz 1.6...
Bo Berglund
bo.berglund at gmail.com
Thu Jul 21 23:14:23 CEST 2016
I have some shared code which has conditionals built in to check the
Delphi version. When I use these functions in Lazarus 1.6/Fpc 3.0 on
Windows7 I get a compile error as follows:
FormClient.pas(152,7) Error: Incompatible types: got "AnsiString"
expected "Int64"
FormClient.pas(152,7) Error: Compile time expression: Wanted Boolean
but got <erroneous type> at IF or ELSEIF
The offending code looks like this:
{$IF CompilerVersion >= 20} {Delphi 2009 = 20..}
with TMemIniFile.Create(IFile, TEncoding.UTF8) do
{$ELSE}
with TMemIniFile.Create(IFile) do
{$IFEND}
What should i do to make this error go away?
I do not understand from where it gets the error message about int64
and AnsdiString...
Second question:
----------------
I use a TFolderDialog component in the program to select a target
directory. Apparently this component is not native Delphi (although I
have used it for years) and so Lazarus barfs at it...
Is there a native Lazarus/Fpc dialog that can be used to let the user
select a directory? Note: no file, just the directory.
--
Bo Berglund
Developer in Sweden
More information about the Lazarus
mailing list