#1 2016-03-19 11:06:30

ertank
Member
Registered: 2016-03-16
Posts: 168

SynCommons - Lazarus v1.6 - FPC v3.0, compile fails

Hi,

My framework version is: 1.18.2458. When I include SynCommons.pas in my uses in Lazarus targeting WinCE platform with ARM cpu I get following error:

SynCommons.pas(765,3) Fatal: Cannot find BaseUnix used by SynCommons.

Is there any workaround I might do to get it compiled? All I need is SynCommons and SyncCrypt to compile with above configuration, not the complete framework.

Thanks.

--Ertan

Offline

#2 2016-03-19 19:09:42

marius maximus
Member
From: Olsztyn
Registered: 2015-06-11
Posts: 30

Re: SynCommons - Lazarus v1.6 - FPC v3.0, compile fails

Look into uses SynCommons.pas

WinCE is not windows and not unix wink It is problem !

{$ifdef MSWINDOWS} 
...  
{$else MSWINDOWS}  

    {$ifdef FPC}
      BaseUnix,
    {$endif}  
{$endif MSWINDOWS}  

In my opinion WinCE at this moment is unsupported, but you have to fight !

Remove BaseUnix and see what happens.

Last edited by marius maximus (2016-03-19 19:11:34)


Lazarus x64 Linux

Offline

#3 2016-03-19 20:02:16

ertank
Member
Registered: 2016-03-16
Posts: 168

Re: SynCommons - Lazarus v1.6 - FPC v3.0, compile fails

Hi Marius,

I have tried your suggestion already. First I thought there will be slight changes and changes will be just at the beginning of file. I was wrong. Unfortunately, {$ifdef}, {$ifndef} and {$else} are all over it. Moreover, file has 55000 lines of code which I am completely not familiar with. I got lost, and converted everything back to default.

What I need is basically what SynCrypto file needs. However, I am lost trying to figure definitions, functions, etc. necessary to identify, too.

Offline

#4 2016-03-20 20:44:52

marius maximus
Member
From: Olsztyn
Registered: 2015-06-11
Posts: 30

Re: SynCommons - Lazarus v1.6 - FPC v3.0, compile fails

This is not a simple task.

Probably you should add windows unit to uses for WINCE
and {$define MSWINDOWS}   for  SynCommons and  SynCrypto (wince has similar api to win32) 


An then

while true do 
begin
  press_CTRL_F9;
  
  if found_error then 
  begin
    in_error_line_insert_DEFINE;  
      //   for example:  
      //   {$ifndef WINCE}  
      //      PROBLEMATIC CODE !!!
      //   {$else}
      //      writeln('to do WINCE!');
      //   {$endif}
  else
    break; 
  end;
end;

This help compile , 
It does not guarantee that the program will work, but first step.

Few years ago I was thinking about wince , but was problematic and I switch to Linux.
At this moment i don't have platofrom for test ,but my lazarus compile EXE for  wince-arm with  SynCrypto  but I can not see if it works

Last edited by marius maximus (2016-03-20 20:48:43)


Lazarus x64 Linux

Offline

#5 2016-03-21 07:17:05

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

Re: SynCommons - Lazarus v1.6 - FPC v3.0, compile fails

WinCE is not a supported platform, indeed.

But I suspect you may try https://github.com/synopse/mORMot/blob/ … Crypto.pas if you need hashing algorithms.

Offline

#6 2016-03-21 12:17:50

ertank
Member
Registered: 2016-03-16
Posts: 168

Re: SynCommons - Lazarus v1.6 - FPC v3.0, compile fails

I do need AES256-SHA for WinCE. I will try what Marius suggested to see if that helps.

Marius, you say that you can compile SnyCrypto under Lazarus for wince-arm, is it possible you pass that file to me for testing? I do have platform to make tests. I also use "SynCommons.HexToBin", "SynCommons.StringToUTF8", and "SynCommons.BinToBase64" in my code. If these are not present in your modified SynCrypto, you may want to send me some code to do actual test together with the SynCrypto file.

Offline

Board footer

Powered by FluxBB