Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin Native libcurl example on Windows

I'm trying to learn how Kotlin Native works with this tutorial from JetBrains: https://kotlinlang.org/docs/tutorials/native/interop-with-c.html

But these tutorials are only fro macOS and Linux. Sometimes i use a windows computer and i want to know how it works there.

How can i add the libcurl library in windows and how can i add it to the libcurl.def file?

It isn't explained anywhere.

like image 865
Daniel Däschle Avatar asked Oct 18 '18 09:10

Daniel Däschle


2 Answers

You need to install MSYS2, then in MSYS2 console install libcurl:

$ pacman -S mingw-w64-x86_64-curl

See https://github.com/JetBrains/kotlin-native/pull/1499

like image 159
Mike Sinkovsky Avatar answered Sep 22 '22 01:09

Mike Sinkovsky


A more detailed step-by-step explanation on how to use dynamically built libcurl (aka DLL) with Kotlin/Native.

https://jonnyzzz.com/blog/2018/10/29/kn-libcurl-windows/

like image 25
Eugene Petrenko Avatar answered Sep 20 '22 01:09

Eugene Petrenko