Patrick
04/20/2020, 2:57 PMpackage sample
import io.ktor.client.HttpClient
import io.ktor.client.engine.curl.Curl
import io.ktor.client.features.json.JsonFeature
import io.ktor.client.features.json.serializer.KotlinxSerializer
import io.ktor.client.request.get
import kotlinx.coroutines.runBlocking
fun main() = runBlocking<Unit> {
val client = HttpClient(Curl) {
install(JsonFeature) {
serializer = KotlinxSerializer()
}
}
val response = client.get<String>("<http://google.de>")
println(response)
}
However the linker fails with this error message: C:\Users\Patrick\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: cannot find -lcurl
- This tells me that curl seems to be missing. However it should be installed on Windows 10 by default. I also downloaded the curl binaries and added them to the include path, but still nothing. Any ideas why the linker fails here?
Thread in #kotlin-native