Kotlin/Native run without console#
链接设置#
在 build.gradle.kts
加入链接设置
kotlin {
val nativeTarget = mingwX64("native")
nativeTarget.apply {
binaries {
executable {
// linkerOpts("-mwindows")
linkerOpts("-Wl,--subsystem,windows")
// 二选一,貌似两种方法都可以
}
}
}
}