Hello, I am trying to use `ktor-client-curl` but i...
# ktor
d
Hello, I am trying to use
ktor-client-curl
but it fails with error:
lld: error: unable to find library -lcurl
I am using
ArchLinux
and I have
curl
installed using
pacman -S curl
Running
curl
from terminal works.
l
You may have to specify another linker flag. I vaguely remember Arch keeping curl in a different spot.
Once you know the path to your curl library on your system, you should be able to add the path as a linker flag to the def file.
d
Copy code
$ which curl
/usr/bin/curl
I don't know how to specify the flag
l
You are actually looking for libcurl.so, which is at /usr/bin/libcurl.so on my Arch system
🙏 1
The way to add the flag depends if you're using a def file or gradle for cinterop. If it's gradle, add linkerflags=-L/usr/bin if I remember correctly.