# Issue with Ktor on windows

**URL:** https://discuss.kotlinlang.org/t/issue-with-ktor-on-windows/16042
**Category:** Native
**Created:** [January 24, 2020, 3:21pm UTC](https://discuss.kotlinlang.org/t/issue-with-ktor-on-windows/16042 "2020-01-24T15:21:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![smitp33](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@smitp33](https://discuss.kotlinlang.org/u/smitp33)
#### Post date: [January 24, 2020, 3:21pm UTC](https://discuss.kotlinlang.org/t/issue-with-ktor-on-windows/16042/1 "2020-01-24T15:21:57Z")

</div>

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](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.

common references

```auto
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

```auto
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:

```auto
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 😉

---

<div class="post-metadata">

### Author: ![Wasabi375](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/wasabi375/32/4741_2.png) [@Wasabi375](https://discuss.kotlinlang.org/u/Wasabi375)
#### Post date: [January 24, 2020, 5:04pm UTC](https://discuss.kotlinlang.org/t/issue-with-ktor-on-windows/16042/2 "2020-01-24T17:04:32Z")

</div>

If I’m reading the documentation [here](https://ktor.io/clients/http-client/engines.html#curl) 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](https://github.com/ktorio/ktor/issues). You probably get more help there than here. I’m not sure how many of the ktor developers frequent this forum.

---

<div class="post-metadata">

### Author: ![Artyom.Degtyarev](https://avatars.discourse-cdn.com/v4/letter/a/ad7895/32.png) [@Artyom.Degtyarev](https://discuss.kotlinlang.org/u/Artyom.Degtyarev)
#### Post date: [January 27, 2020, 7:08am UTC](https://discuss.kotlinlang.org/t/issue-with-ktor-on-windows/16042/3 "2020-01-27T07:08:11Z")

</div>

Hi, @smitp33! Maybe [this](https://github.com/JetBrains/kotlin-native/blob/master/samples/libcurl/README.md) can help you a bit.

---

<div class="post-metadata">

### Author: ![joffrey.bion](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/joffrey.bion/32/5084_2.png) [@joffrey.bion](https://discuss.kotlinlang.org/u/joffrey.bion)
#### Post date: [June 14, 2022, 10:12pm UTC](https://discuss.kotlinlang.org/t/issue-with-ktor-on-windows/16042/4 "2022-06-14T22:12:23Z")

</div>

Link is dead, moved to [https://github.com/JetBrains/kotlin/blob/master/kotlin-native/samples/libcurl/README.md](https://github.com/JetBrains/kotlin/blob/master/kotlin-native/samples/libcurl/README.md)

But I guess a more relevant link now would be the Ktor doc itself:  
[https://ktor.io/docs/faq.html#native-curl](https://ktor.io/docs/faq.html#native-curl)
