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

Launch Visual Studio Code From MSYS2

Submitted by Dickens A S on Wed, 07/21/2021 - 05:35

This article demonstrates How to launch vscode.exe with MSYS2

Download Visual Studio Code

download the .zip version of the VS Code from the below URL

https://code.visualstudio.com/download

Unzip the .zip into C:\msys64\opt\vscode

Launch VS Code

open 64 bit MINGW by running c:\msys64\mingw64.exe

check version of vs code by running 

$ /opt/vscode/bin/code --version
1.58.2
c3f126316369cd610563c75b1b1725e0679adfb3
x64

launch vs code be running 

Installing R inside MSYS2 using Miniconda in Windows

Submitted by Dickens A S on Tue, 07/20/2021 - 06:19

This article demonstrates how install R using Miniconda inside MSYS2 MINGW64 shell

Download and install Miniconda

MIniconda can be downloaded from https://docs.conda.io/en/latest/miniconda.html

Install miniconda iniside c:\msys64\opt\miniconda without adding to PATH

Set PATH environment variable permanently in MSYS2 .bashrc

Open c:\msys64\home\<username>\.bashrc and add scripts folder to the PATH

Example .bashrc

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

Connect SQLite from gnu COBOL in Windows

Submitted by Dickens A S on Mon, 07/12/2021 - 08:37

This article demonstrates how connect SQLite3 from COBOL using MSYS2 in WIndows

Download SQLite3 amalgamation https://www.sqlite.org/2021/sqlite-amalgamation-3360000.zip

get sqlite3.c from the above zip file and put it in the same place where you cobol is compiles

"test.db" is pre created with DBeaver plugin in eclipse

Install sqlite3 in MSYS2 using

Run COBOL / gnuCOBOL using MSYS2 in Windows

Submitted by Dickens A S on Mon, 07/12/2021 - 03:55
Run COBOL in windows

Why COBOL in 2021?

The reason is, many migration still happening from mainframe COBOL to Java or .NET

If the developer knows how test the COBOL in his local machine, then it benefits the migration to speed up

This article demonstrates the Cygwin dependencies to compile gnuCOBOL from source code

Mainframe is going through another refresh cycle to make mainframe available in Cloud based IDE like Eclipse CHE

It is important to learn to COBOL

What is this article?