#1 2023-01-25 21:06:37

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 392

delphi compilation error after xxxxxxxxxxxxx

mormot.orm.base line 10566
[dcc32 Error] mormot.orm.base.pas(10566): E2010 Incompatible types: 'TOrmCacheEntryValueDynArray' and 'Pointer'

Last edited by dcoun (2023-02-08 20:48:42)

Offline

#2 2023-01-26 07:38:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: delphi compilation error after xxxxxxxxxxxxx

I guess you did not try with a latest commit.

Offline

#3 2023-01-26 10:46:27

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 392

Re: delphi compilation error after xxxxxxxxxxxxx

I am using the latest commit from Github. Problem started after commit 5e6f3685
One of the three cases that do not allow to be compiled is the following:
i := SortFind(pointer(Value), aID, Count);
Removing the pointer substitution it compiles OK:
  i := SortFind(Value, aID, Count);
Why do we need the pointer?

Offline

#4 2023-01-26 12:33:57

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 218
Website

Re: delphi compilation error after xxxxxxxxxxxxx

I have the same error message, you mark value as Pointer, but SortFind expects TOrmCacheEntryValueDynArray, which value is already.

Offline

#5 2023-01-26 12:35:48

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 218
Website

Re: delphi compilation error after xxxxxxxxxxxxx

P.S.: lines 10566, 10582, 10725

Offline

#6 2023-01-26 21:17:49

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: delphi compilation error after xxxxxxxxxxxxx

Now I understand.

Older Delphi versions (e.g. XE7) did not have any problem with these lines (nor FPC).
Only recent Delphi revisions did complain.

Should be fixed now
with https://github.com/synopse/mORMot2/commit/2325a070

Offline

#7 2023-02-08 20:49:49

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 392

Re: delphi compilation error after xxxxxxxxxxxxx

Delphi 11.2 after last commits:
[dcc32 Error] mormot.net.sock.windows.inc(1162): E2010 Incompatible types: 'Winapi.Windows.PCCERT_CONTEXT' and 'mormot.core.os.PCCERT_CONTEXT'
[dcc32 Error] mormot.net.sock.windows.inc(1335): E2010 Incompatible types: 'mormot.core.os.PCCERT_CONTEXT' and 'Winapi.Windows.PCCERT_CONTEXT'

Offline

#8 2023-02-08 21:26:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: delphi compilation error after xxxxxxxxxxxxx

It is weird: it did not trigger an error with XE## versions.
They did add some definitions in Windows.pas which where previously in other units... so it did not compile any more...
sad

Please try
https://github.com/synopse/mORMot2/commit/98c67f69

Offline

#9 2023-02-08 21:28:05

dcoun
Member
From: Crete, Greece
Registered: 2020-02-18
Posts: 392

Re: delphi compilation error after xxxxxxxxxxxxx

fixed.
Thank you a lot @ab

Offline

Board footer

Powered by FluxBB