I'm using Delphi Alexandria on Windows 11 to develop a MacOS application in FMX.
I'm trying to use OpenSSl; I have libssl.1.0.0.dylib and libcrypto.1.0.0.dylib in the directory.
But I always have an error:
can't load ssl library
So I'm debugging, and notice that in the IdGlobal unit, the HackLoad() function returns 0:
function HackLoad(const ALibName : String; const ALibVersions : array of String) : TIdLibHandle;
var
i : Integer;
function LoadLibVer(const ALibVer: string): TIdLibHandle;
var
FileName: string;
begin
FileName := HackLoadFileName(ALibName, ALibVer);
{$IFDEF USE_SAFELOADLIBRARY}
Result := SafeLoadLibrary(FileName);
{$ELSE}
// ** here result is not equal to 0 **
// **BUT here, this method brings the result to 0 **
{$IFDEF USE_INVALIDATE_MOD_CACHE}
InvalidateModuleCache;
{$ENDIF}
end;
I tested several libraries and debugging the code.