Issue with Ktor on windows

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 example I have got the code to look ok in the IDE in terms of dependencies.

common references


and the native windows clients references


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 :wink:

If I’m reading the documentation here correctly you need to have curl installed (version 7.63 or later) in addition to adding the dependency to your build file. If this isn’t the problem you should consider opening an issue on their github. You probably get more help there than here. I’m not sure how many of the ktor developers frequent this forum.

Hi, @smitp33! Maybe this can help you a bit.