I'm on Linux Ubuntu 18.04
64-bit with FPC 3.0.4. I want to download a file from the internet with the following console program:
{$mode objfpc}{$H+}
uses fphttpclient,openssl;
procedure download(url,filespec: ansistring);
var Client: TFPHttpClient;
begin
InitSSLInterface;
Client:=TFPHttpClient.Create(nil);
try
try
Client.AllowRedirect:=true; {allow redirections}
Client.Get(url, filespec);
except
on E: EHttpClient do writeln(E.Message)
else raise;
end;
finally
Client.Free;
writeln('Done');
end;
end;
const URL = 'https://example.com/example.mp4';
Filespec = '/hg/tmp/xx.mp4';
begin
download(URL,Filespec);
end.
When I compile this program with 64-bit, it works fine. When I cross-compile it with 32-bit then I get a runtime exception "EInOutError: Could not initialize OpenSSL library".
I'm a beginnter to this stuff. I guess, that my program needs a library, which exists for 64-bit, but not for 32-bit. Can this be?
If yes, how can I find out the name of this library and how can I "install" it as 32-bit?
Thanks in advance. Happy Christmas and peace to everybody.