This is example for coding with Kotlin/Native, linking C libraries and comparison java.net.* with libcurl
- Run
gradlew runDebugExecutableMingw
- Stop task after getting error
- Copy
libcurl_win/bin/libcurl-x64.dll
andcacert.pem
to run directory (this isbuild/bin/mingw/debugExecutable
by default for mingw target) - Again run
gradlew runDebugExecutableMingw
- Go to
build.gradle.kts
- Find lines
binaries {
executable {
runTask.let { task ->
task?.args("https://example.org/")
}
entryPoint = "main"
}
}
- Change
task?.args("https://example.org/")
totask?.args("[YOUR CHECKING URL]")
- Run
- Run
gradlew jvmJar
- Go to
build/libs
directory - Open terminal and run
java -jar KotlinNativeApp-1.0-all.jar <url>
- libcurl for Windows for mingw and linux (to-do) target
- java.net.* for JVM target
- Add linux target support
- Add macos target support