Question re: Ktor / Client with curl : I'm trying ...
# ktor
j
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
Hi @jk2018, what is your os version?
j
Windows 10
e
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
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/ ?