https://kotlinlang.org logo
Title
n

Nikky

05/05/2021, 8:04 PM
i am trying to use
Curl
engine on desktop i am running into
C:\Users\nikky\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: cannot find -lcurl
i am trying to figure out where i need to install curl.. or what magic env var i have to set i am guessing i need to install
pacman -S mingw-w64-x86_64-curl
in MSYS2, but apparently it is not picked up maybe because my msys2 is not in the default location? i also installed
curl
via scoop, not sure what else i can do
d

Dominaezzz

05/06/2021, 6:03 AM
What does your linkerOpts look like in gradle?
n

Nikky

05/06/2021, 8:03 AM
i have no linkerOpts, i guess those would be in
ktor-engine-curl
d

Dominaezzz

05/06/2021, 8:04 AM
They could be in either but it looks like you'll have to add them too.
n

Nikky

05/06/2021, 8:04 AM
also.. i figured out how to get it working.. but.. it only work withink gitbash as from
cmd
or such it cannot find the
libcurl-4.dll
and i was informed that static linking might not be possible right now anyways
d

Dominaezzz

05/06/2021, 8:05 AM
Yeah static linking curl is a pain, there's a lot of things you'll also have to link in on its behalf.
Might just need to restart your IDE.
n

Nikky

05/06/2021, 8:21 AM
yeah.. i do not really get linking and such.. there are other things i can work on.. i will follow samples as soon as there is some i cannot be the only one wanting static linking..
d

Dominaezzz

05/06/2021, 9:49 AM
When I get off work, I can assist you with the link line. Just send me your gradle file.
d

Dominaezzz

05/07/2021, 2:08 PM
Sweet, I'll take a look.
Ah rip, it's a "library". Don't have the option of assuming where the user has installed libcurl. Yeah looks like you're stuck with static linking. Or https://github.com/ktorio/ktor/issues/671