kotlin

Combine / Call Fortran DLL inside Kotlin Native using Gradle KTS

Submitted by Dickens A S on Thu, 07/22/2021 - 10:54

Call Fortran from Kotlin Native

This article demonstrates how to change the toolchain name using Gradle KTS and invoke gfortran compiler instead of g++ compiler and produce a DLL and reuse a Fortran subroutine or function inside a Kotlin Native code

There is a sub project named libfort1 which has Gradle KTS file, it has been improved to trigger a different exe command line using Gradle Action APIs, which allows the developer to modify the executable as well as parameters sent to the executable

Kotlin JVM JNI C++ Inheritance and Callback using SWIG

Submitted by Dickens A S on Tue, 07/20/2021 - 03:59

Based on Article kotlin-jni-swig-gradle-cpp

This Article demonstrates how to Inherit class from C++ class and how to make C++ calls back the Kolin function using overriding

GitHub: https://github.com/dickensas/kotlin-gradle-templates/tree/master/swig-jni-inherit-callback

For C Pointer Refer Article kotlin-swig-jni-arrays-and-pointers

Kotlin JVM JNI using SWIG Arrays and Pointers

Submitted by Dickens A S on Mon, 07/19/2021 - 09:28

Based on Article kotlin-jni-swig-gradle-cpp

This Article demonstrates how to pass pointers and arrays in and out using pure C code and JNI and force pure C code in Gradle

GitHub: https://github.com/dickensas/kotlin-gradle-templates/tree/master/swig-jni-cpointer

The Gradle SWIG Task of cpplib

Kotlin WIN32 DirectX 9 Off Screen Surface Gradient Direct Pixel Access

Submitted by Dickens A S on Sun, 11/29/2020 - 12:08

Code DirectX 9 using kotlin

Kickstart Kotlin DirectX using WIN32 API's, DirectX SDK 2010

GitHub: https://github.com/dickensas/kotlin-gradle-templates/tree/master/win32-directx

Output window with WIN32 API

Kotlin DirectX 9

Around 150 line of Kotlin code