tylerwilson
10/10/2018, 11:31 PMSeri
10/11/2018, 2:49 AMkenkyee
10/11/2018, 6:38 AMLeonid Popescu
10/12/2018, 6:47 AMhmole
10/12/2018, 1:16 PMNSLayoutConstraint
not available from generated Kotlin bindings? Anything I'm missing?schlan
10/13/2018, 10:51 AMHttpClient
in the common source folder.
Compiling the jar works but when building for iOS I run into this error:
./gradlew :kotlin-native-common:linkDebugFrameworkIos
....
> Task :kotlin-native-common:linkDebugFrameworkIos
kotlin-native-v2-common/src/commonMain/kotlin/com/sebchlan/chat/Chat.kt:3:8: error: unresolved reference: io
import io.ktor.client.HttpClient
^
kotlin-native-v2-common/src/commonMain/kotlin/com/sebchlan/chat/Chat.kt:8:15: error: unresolved reference: HttpClient
val bla = HttpClient {
^
schlan
10/13/2018, 10:52 AMkotlin_version=1.3.0-rc-146
coroutines_version=0.30.2-eap13
ktor_version=1.0.0-alpha-1
serialization_version=0.8.1-rc13
fabianterhorst
10/13/2018, 5:00 PMmarcinmoskala
10/14/2018, 8:55 AMQuang Luong
10/14/2018, 2:02 PMMatej Kormuth
10/14/2018, 4:04 PMagrosner
10/14/2018, 11:31 PMjkbbwr
10/15/2018, 10:00 AMralf
10/15/2018, 5:20 PMMatej Kormuth
10/15/2018, 8:22 PMtypedef struct GLFWwindow GLFWwindow;
in GLFW are being mapped to kotlinx.cinterop.CPointer<cnames.structs.GLFWwindow>?
and have "ERROR" texts in IDE next to them.Matej Kormuth
10/15/2018, 11:16 PMglCreateShader
are defined with preprocessor macro: #define glCreateShader GLEW_GET_FUN(__glewCreateShader)
where macro is defined as #define GLEW_GET_FUN(x) x
but in klib there is only __glewCreateShader
variable public var __glewCreateShader: glew.PFNGLCREATESHADERPROC? /* = kotlinx.cinterop.CPointer<kotlinx.cinterop.CFunction<(glew.GLenum /* = kotlin.UInt */) -> glew.GLuint /* = kotlin.UInt */>>? */ /* compiled code */
and not the function.David
10/16/2018, 8:32 AMagrosner
10/16/2018, 3:08 PMHamza
10/17/2018, 12:54 AMhmole
10/17/2018, 9:05 AMQuang Luong
10/17/2018, 10:27 AMlwan
web framework. But after cinterop and stuff, I always run into this issue
----
To compile normal app in C with lwan, this command would work
clang runApp.c -o samplelwan -Wl,-whole-archive -I../src/lib ../build/src/lib/liblwan.a -Wl,-no-whole-archive -lz -lpthread -llua5.1 -lmhmole
10/17/2018, 10:58 AMmyObj::func
) object throws an error, but if you make a val out of it before freezing it works fine?yusuf3000
10/17/2018, 12:45 PMruntime assert: Unknown open method
mean in layman terms?hmole
10/17/2018, 2:01 PMInfo.plist
for framework without doing it manually through updating the file after compilation?rafal.adasiewicz
10/17/2018, 3:18 PMKotlinx_coroutines_core_nativeCoroutineDispatcher
is undeclared. Moreover, I’ve spotted that if I go with the second solution https://github.com/Kotlin/kotlinx.coroutines/issues/470#issuecomment-414635811 everything works fine and Kotlinx_coroutines_core_nativeCoroutineDispatcher
is declared properly. Why does Kotlinx_coroutines_core_nativeCoroutineDispatcher
type disappears in the first approach?
I am using:
coroutines - '0.30.2-eap13'
kotlin_version = '1.3.0-rc-146'
Gradle version = 4.7
spierce7
10/18/2018, 5:58 AMNo descriptor for type {[@kotlin.ParameterName] T & Any}?
spierce7
10/18/2018, 1:13 PMNSMutableArray
cast to a List<>
in the following object, would this have any problems being frozen shared between threads safely in Kotlin/native?louiscad
10/18/2018, 3:19 PMlet label = UILabel(frame: CGRect(x: 0, y: 0, width: 300, height: 21))
label.center = CGPoint(x: 160, y: 285)
label.textAlignment = .center
label.font = label.font.withSize(25)
label.text = CommonKt.createApplicationScreenMessage()
view.addSubview(label)
Per the Obj-C interop doc, I should be able to write val label = UILabel.create(frame: CGRect.create(x = 0, y = 0, width = 300, height = 21))
for the first line, but there's no create(…)
function in the autocomplete when using IntelliJ CE 2018.3 EAP with Kotlin 1.3.0-rc-146… Can anyone give me a hint?Quang Luong
10/18/2018, 5:15 PMset_response(res)
), it would work. It does nothing except passing the response pointer around.nayanjyoti
10/18/2018, 7:27 PMplugins {
id 'kotlin-multiplatform' version '1.3.0-rc-146'
}
repositories {
maven { url '<http://dl.bintray.com/kotlin/kotlin-eap>' }
mavenCentral()
}
group 'com.example.sample'
version '0.0.1'
apply plugin: 'maven-publish'
kotlin {
targets {
fromPreset(presets.jvm, 'jvm')
fromPreset(presets.js, 'js')
// For ARM, preset should be changed to presets.iosArm32 or presets.iosArm64
// For Linux, preset should be changed to e.g. presets.linuxX64
// For MacOS, preset should be changed to e.g. presets.macosX64
fromPreset(presets.macosX64, 'macos')
}
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
}
commonTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test-common'
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
}
}
jvmMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
}
}
jvmTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test'
implementation 'org.jetbrains.kotlin:kotlin-test-junit'
}
}
jsMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
}
}
jsTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test-js'
}
}
macosMain {
dependencies {
}
}
macosTest {
}
}
}
in the macos main module i want to include the ncurses library.
So I changed the part as
macosMain {
dependencies {
cinterop('ncurses') {
// something more
}
}
}
I am getting error Could not find method cinterop() for arguments [ncurses, build_1mx5jx84o9toi8bpdxyehixos$_run_closure2$_closure6$_closure13$_closure21$_closure22@836eb38] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler.
Also I’m a total newbie to c/cpp or native world, so i may be doing something really stupid. if anyone can help i would b really grateful.nayanjyoti
10/18/2018, 7:27 PMplugins {
id 'kotlin-multiplatform' version '1.3.0-rc-146'
}
repositories {
maven { url '<http://dl.bintray.com/kotlin/kotlin-eap>' }
mavenCentral()
}
group 'com.example.sample'
version '0.0.1'
apply plugin: 'maven-publish'
kotlin {
targets {
fromPreset(presets.jvm, 'jvm')
fromPreset(presets.js, 'js')
// For ARM, preset should be changed to presets.iosArm32 or presets.iosArm64
// For Linux, preset should be changed to e.g. presets.linuxX64
// For MacOS, preset should be changed to e.g. presets.macosX64
fromPreset(presets.macosX64, 'macos')
}
sourceSets {
commonMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
}
commonTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test-common'
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
}
}
jvmMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
}
}
jvmTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test'
implementation 'org.jetbrains.kotlin:kotlin-test-junit'
}
}
jsMain {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
}
}
jsTest {
dependencies {
implementation 'org.jetbrains.kotlin:kotlin-test-js'
}
}
macosMain {
dependencies {
}
}
macosTest {
}
}
}
in the macos main module i want to include the ncurses library.
So I changed the part as
macosMain {
dependencies {
cinterop('ncurses') {
// something more
}
}
}
I am getting error Could not find method cinterop() for arguments [ncurses, build_1mx5jx84o9toi8bpdxyehixos$_run_closure2$_closure6$_closure13$_closure21$_closure22@836eb38] on object of type org.jetbrains.kotlin.gradle.plugin.mpp.DefaultKotlinDependencyHandler.
Also I’m a total newbie to c/cpp or native world, so i may be doing something really stupid. if anyone can help i would b really grateful.orangy
10/18/2018, 7:58 PMfromPreset(presets.macosX64, 'sdl2macos') {
compilations.main {
cinterops {
sdl {
defFile = file("sdl2/interop/sdl2.def")
}
}
}
}
nayanjyoti
10/18/2018, 8:34 PMheaders = /usr/local/opt/ncurses/include/ncurses.h
headerFilter = /usr/local/opt/ncurses/include/ncursesw/*
linkerOpts.osx = -L/usr/local/opt/ncurses/lib -lncurses
The paths are all okay. the file /usr/local/opt/ncurses/include/ncurses.h
is the header file from the installation of homebrew on mac mojave.
I used the command cinterop -def src/macosMain/ncurses.def -compilerOpts -I/usr/local/opt/ncurses/include -o src/macosMain/lib/ncurses
to generate the binding to look into the functions.
On executing, a kotlin file is created at the path src/macosMain/lib/ncurses-build/kotlin/ncurses/ncurses.kt
. The content od the file is empty. (apart from the package import and @file statements).content is below
@file:kotlinx.cinterop.InteropStubs
@file:Suppress("UNUSED_VARIABLE", "UNUSED_EXPRESSION")
package ncurses
import kotlin.native.SymbolName
import kotlinx.cinterop.*
// NOTE THIS FILE IS AUTO-GENERATED
This doesn’t seem right. I’m not even sure if I’m doing the right thing here. 😞orangy
10/18/2018, 8:37 PMcinterop
manually, gradle task should handle it for you. Please check https://github.com/JetBrains/kotlin-native/blob/master/INTEROP.md for more information about .def
filesnayanjyoti
10/18/2018, 8:42 PMfromPreset(presets.macosX64, 'macos') {
compilations.main {
cinterops {
ncurses {
defFile = file('src/macosMain/ncurses.def')
includeDirs '/usr/local/opt/ncurses/include'
}
}
}
}