Kotlin Native load dll


#1

Will it be possible to connect dll to kotlin as easy as “ctypes” in python? For example: cinterop.load (“name.dll”)


#2

Nope, Kotlin is a statically typed language, you have to define the methods available in the dll. cinterops does just that for you automatically.


#3

can i use dll from delphi if i write them a “.h” file?


#4

It should, but you need to create import library, using dlltool from msys2-mingw64 distribution

http://www.mingw.org/wiki/createimportlibraries


#5

And what exactly gives “.lib”, is it possible to use someone else’s dll without the delivery “.h” in the kit?


#6

Have a look here.


#7

It should be “.dll.a”. Even more precisely - “lib*.dll.a”


#8

You need to have the .h and create the .def. Then using cinterop you need to tell the compiler to link your dll in the app or library you are building. In the repository of Kotlin Native there are many examples. Most of them are not commented since K/N is still in beta.


#9

In your opinion, how much time is needed for K / N to equal the readiness of kotlin to jvm.
How do I understand the development began in 2017, then this is at least 2-3 years?