Вопрос

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?

Это было полезно?

Решение

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.

Другие советы

You don't need to mess around with svn.

Just locate and open Synedit.inc and add this code before the other compiler defs

{$IFDEF VER270}
  {$DEFINE SYN_COMPILER_19}
  {$DEFINE SYN_DELPHI}
  {$DEFINE SYN_DELPHI_XE5}
{$ENDIF} 

It just fools it into thinking its XE5

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top