Search code examples
delphisyneditdelphi-xe6

SynEdit compile error Delphi XE6


I have downloaded the latest SynEdit package from SourceForge, trying to install, but I1m getting the following error:

[dcc32 Error] SynUnicode.pas(1723): E2010 Incompatible types: 'AnsiChar' and 'Char'

{$IFNDEF SYN_COMPILER_6_UP}
{$IFDEF SYN_WIN32}
function UnicodeToUtf8(Dest: PAnsiChar; MaxDestBytes: Cardinal;
  Source: PWideChar; SourceChars: Cardinal): Cardinal;
var
  i, count: Cardinal;
  c: Cardinal;
begin
  ...
  begin
>    Dest[count] := Char(c);
    Inc(count);
  end
...
end;

SYN_COMPILER_17_UP is defined. Any idea how to install this package properly?


Solution

  • You need to download the latest version from the source control repository, rather than a pre-packaged archive. The pre-packaged archive that you downloaded is long out of date. If you only have defines for compiler version 17 then you have an XE3 version of the code.

    The very latest revisions in the source control repository do support XE6. This was added in revision 115.