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

jk2018

01/22/2020, 9:51 PM
Question re: Ktor / Client with curl : I'm trying to build a simple client that does an HTTP request .. in IntelliJ. Getting the compiler error: "... cannot find -lcurl" . What's the easiest way to add this dependency ? Can I even do this in IntelliJ or do I need CLion to compile lcurl?
e

e5l

01/23/2020, 8:47 AM
Hi @jk2018, what is your os version?
j

jk2018

01/23/2020, 5:08 PM
Windows 10
e

e5l

01/24/2020, 7:36 AM
Kotlin native uses MSYS2-MinGW64 dependencies on win platform by default
btw you can also build libcurl and provide dynamic library path to the executable
j

jk2018

01/24/2020, 12:16 PM
Thanks! Installing msys 64 and lib curl, placing all required Libs next to the exe fixes it. Wasn't clear to me that I need to put the dlls there.
A more verbose error message would be nice here.
What do you mean by " provide dynamic library path to the executable"
Is there a way to bundle all dependencies into the exe?
In other words, am I able to statically link libs?
In guess what I mean is related to this: https://github.com/JetBrains/kotlin-native/issues/469#issuecomment-294093603 . Got a pointer to docs on how to statically link everything if possible?
@jonnyzzz, do you know how to statically link curl ? Looks like you looked into this a while back : https://jonnyzzz.com/blog/2018/10/29/kn-libcurl-windows/ ?
8 Views