Tuesday, 14 April 2020
  1 Replies
  1.4K Visits
  Subscribe
Hi,

I need to compile some clients using delphi ( 2007 ) no problems here, I tested before the compilation of sgcWebSockets with Lazarus trunk on Windows and everything was fine too, so good so far, then I went to Ubuntu Linux + Lazarus Trunk, and heres I found a problem, it refused to compile the package because of the calling convention used on the two protected methods of the class TInterfacedComponent, currently they are :


function _AddRef: integer; stdcall;
function _Release: integer; stdcall;


I changed them to be :


function _AddRef: integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};
function _Release: integer; {$IFNDEF WINDOWS}cdecl{$ELSE}stdcall{$ENDIF};


I'm not sure if I have chosen the best conditional compilation defines but is compiling and installing succesfully after the change, BTW I'm on version 4.3.1, I don't know if more recent versions has this change included,

Regards,
Mocte