New user of kotlin multi-platform and I am trying to get a simple poc created that will call an api on both windows and mac.
Following the https://github.com/ktorio/ktor-samples/tree/master/mpp/client-mpp example I have got the code to look ok in the IDE in terms of dependencies.
implementation(kotlin("stdlib-common")) implementation("io.ktor:ktor-client-core:1.1.1") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3")
and the native windows clients references
implementation("io.ktor:ktor-client-core-native:1.3.0") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.3.3") implementation("io.ktor:ktor-client-curl:1.3.0")
When I come to run it I get the following issue:
C:\Users\pjsmith\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1\bin\ld: cannot find -lcurl clang++: error: linker command failed with exit code 1 (use -v to see invocation) e: C:\Users\pjsmith\.konan\dependencies\msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1/bin/clang++ invocation reported errors
I must need to provide curl somehow to the project, but reading around it was not obvious on how to do this using the local msys2 that is pulled down by the IDE.
Thanks in advance