https://kotlinlang.org logo
#ktor
Title
# ktor
d

Dragos Rachieru

05/03/2022, 7:42 AM
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

Landry Norris

05/03/2022, 8:57 PM
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

Dragos Rachieru

05/04/2022, 10:20 AM
Copy code
$ which curl
/usr/bin/curl
I don't know how to specify the flag
l

Landry Norris

05/04/2022, 2:51 PM
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.
6 Views