Delphi FMXLinux cannot find -lcurl

  

I cannot link an application using FMXLinux because the linker cannot find the curl library (Delphi 10.3.3):

[DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\ld-linux.exe: error: cannot find -lcurl
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_global_init(int): error: undefined reference to ‘curl_global_init’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_global_cleanup(): error: undefined reference to ‘curl_global_cleanup’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_slist_append(curl_slist*, char*): error: undefined reference to ‘curl_slist_append’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_slist_free_all(curl_slist*): error: undefined reference to ‘curl_slist_free_all’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_strerror(CURLcode): error: undefined reference to ‘curl_easy_strerror’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_init(): error: undefined reference to ‘curl_easy_init’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_setopt(void*, CURLoption): error: undefined reference to ‘curl_easy_setopt’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_perform(void*): error: undefined reference to ‘curl_easy_perform’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_cleanup(void*): error: undefined reference to ‘curl_easy_cleanup’
c:\program files (x86)\embarcadero\studio\20.0\lib\Linux64\debug\Linuxapi.Curl.o:Linuxapi.Curl:function Linuxapi::Curl::curl_easy_getinfo(void*, CURLINFO): error: undefined reference to ‘curl_easy_getinfo’
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001)

But on my ubuntu 19.10 system I can find the libcurl.so.4 in the folder usr/lib/x86-64-linux-gnu
and this folder is synced in my Delphi SDK folder at C:\Users\MyUser\Documents\Embarcadero\Studio\SDKs\ubuntu19.10.sdk\lib\x86_64-linux-gnu

UPDATED: If I rename manually the library file libcurl.so.4 to libcurl.so in the local ubuntu-SDK folder I can build my project. Do I need to install an older version of libcurl.so when using the delphi RTL library Linuxapi.Curl (e.g. used from System.Net.HttpClient.Linux)?

Thank you for any hint!

Comments are closed.