https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
kotlin-native
  • s

    spierce7

    12/18/2021, 4:31 AM
    My team has a shared kotlin library between an android and an iOS app called
    presentation
    . We are migrating usage of it from the xcode buildscripts method to instead use cocoapods. We’re getting an unclear gradle error when building from xcode, and aren’t sure how to fix it. Any help would be appreciated:
    * What went wrong:
    Task 'Debug' not found in project ':presentation'.
    • 1
    • 1
  • j

    jimn

    12/18/2021, 11:38 AM
    i have a set of ported C testcases for linux which have been built as gradle
    binaries{executable {...}}
    and I found the legend in the Multiplatform doc that says
    binaries{test{...}}
    will perform a "test executable". Has anyone used this? That seems to be where the documentation trail drops off a steep cliff. so what i did was to
    mv
    said kt files from
    LinuxX86Main
    to
    LinuxX86Test
    , though i've noticed the results are not supported in intellij gradle dialog to say the very least. When gradle runs testallLinuxX64 it doesn't appear to know or mind not knowing where the native test executables are and how to run them, but it completes successfully. when a given entry of the test executables is linked, they link do consume some cpu fan and cycles. How does one run "test executables" from gradle?
    • 1
    • 1
  • m

    martmists

    12/18/2021, 4:50 PM
    How do I use cinterop on windows?
    headers = Python.h
    package = python
    compilerOpts.windows = /I 'C:\\Program Files\\Python39\\Include'
    
    # ignore this one, it's autogenerated from python sysconfig
    compilerOpts.linux = -I'C:\\Program Files\\Python39\\Include'
    linkerOpts.linux = -L/usr/lib -l python3
    
    ---
    
    struct KtPyObject {
        PyObject base;
        void* ktObject;
    };
    I tried this but I get
    Exception in thread "main" java.lang.Error: C:\Users\martm\AppData\Local\Temp\1630593588999760275.c:1:10: fatal error: 'Python.h' file not found
    	at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:192)
    	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.indexDeclarations(Indexer.kt:1189)
    	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1178)
    	at org.jetbrains.kotlin.native.interop.indexer.IndexerKt.buildNativeIndexImpl(Indexer.kt:1174)
    	at org.jetbrains.kotlin.native.interop.gen.jvm.DefaultPlugin.buildNativeIndex(Plugins.kt:31)
    	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:272)
    	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:76)
    	at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
    	at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:38)
    	at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:60)
    h
    • 2
    • 9
  • r

    Roeniss Moon

    12/18/2021, 5:45 PM
    Hi! I'm following this tutorial for beginner: https://kotlinlang.org/docs/native-get-started.html#count-the-unique-letters-in-your-name Everything works exactly as mentioned in that but one thing bothers me -- it doens't run automatically when I run
    ./gradlew runDebugExecutableNative
    or
    ./gradlew runReleaseExecutableNative
    . My IntelliJ just make a build binaries and said its job done. On the contrary, in the guide, it looks like the program is running when that commands initiated. So I wonder why my program doesn't work like that. I'm using macOS m1 (aarch64) v12.0.1, Kotlin v1.6.10 and Intellij v2021.3
    • 1
    • 3
  • a

    Andy Victors

    12/18/2021, 6:14 PM
    Is there any kotlin code generation solution for native? KotlinPoet does not seem to support native target.
    j
    j
    • 3
    • 5
  • m

    Miroslav Sobotka

    12/19/2021, 4:27 PM
    Hi 👋 has anyone tried this new linker https://github.com/rui314/mold? It might maybe solve the linker speed problems (because the compilation is now quite fast, however the linking is terribly slow 🐢).
    e
    a
    +2
    • 5
    • 5
  • r

    Rahul Rawat

    12/19/2021, 4:33 PM
    Can anyone please help with the following issue coming with sqldelight
    Execution failed for task ':compileSqlDriverNativeMainKotlinMetadata'
    w: library included more than once: /Users/rahulrawat/.konan/kotlin-native-prebuilt-macos-x86_64-1.5.31/klib/common/stdlib
    w: Could not find "co.touchlab:sqliter-driver-cinterop-sqlite3" in [/Users/rahulrawat/Desktop/Projects/kmp/AddressLibrary, /Users/rahulrawat/.konan/klib, /Users/rahulrawat/.konan/kotlin-native-prebuilt-macos-x86_64-1.5.31/klib/common, /Users/rahulrawat/.konan/kotlin-native-prebuilt-macos-x86_64-1.5.31/klib/platform/ios_arm64]
    Tried reverting to 1.5.2 of sqlDelight and kotlin 1.5 but nothing seems to be working.
    k
    • 2
    • 8
  • r

    Reuben F

    12/19/2021, 7:09 PM
    got a couple steps further (see PR comments); now
    /usr/lib/x86_64-linux-gnu/libtinfo.so: error: undefined reference to 'stat', version 'GLIBC_2.33'
    is there a list of system dependencies that need to be installed anywhere?
    m
    • 2
    • 4
  • m

    martmists

    12/19/2021, 7:28 PM
    Is there any difference between a .lib file msvc expects and a .a file generated by kotlin/native?
    j
    • 2
    • 3
  • p

    Paul Woitaschek

    12/20/2021, 2:50 PM
    Has someone already the new memory model in production use? From the introduction I was kind of blown off to use it (report if performance is >5x worse) I did a benchmark on one of our data intensive flows and actually its faster with the new memory model (6seconds -> 4seconds). Is there info on which code paths are expected to be slower?
    👀 5
    k
    e
    +2
    • 5
    • 12
  • n

    napperley

    12/21/2021, 12:21 AM
    Noticed one case where the new MM has some problems, string allocation. In one of my projects I am developing an Embedded GUI application. It was discovered that if
    lv_dropdown_set_options
    ( https://docs.lvgl.io/8.0/widgets/core/dropdown.html?highlight=lv_dropdown_set_options#_CPPv423lv_dropdown_set_optionsP8lv_obj_tPKc ) is used instead of the
    lv_dropdown_set_options_static
    ( https://docs.lvgl.io/8.0/widgets/core/dropdown.html?highlight=lv_dropdown_set_options_static#_CPPv430lv_dropdown_set_options_staticP8lv_obj_tPKc ) function then the reserved memory usage increases by about 400 KB, ouch! 🩹 . This is the string literal that is passed through to the function:
    "Male\nFemale\nOther"
    👍 1
    • 1
    • 1
  • n

    napperley

    12/21/2021, 12:49 AM
    Would be very cool :cool-doge: to run K/N code in Kotlin Playground ( https://play.kotlinlang.org/ ) if that feature was available.
    :plus1: 9
    j
    • 2
    • 3
  • b

    bod

    12/22/2021, 9:44 AM
    Hey I’m wondering what it would mean for a multi-module project where one of the modules has
    kotlin.native.binary.memoryModel=experimental
    and not the other ones? Would that even make any sense?
    j
    • 2
    • 3
  • t

    tunedal

    12/23/2021, 3:33 PM
    Is there an example somewhere of how to add integration tests to a simple Kotlin/Native project targeting a single platform? The various Gradle incantations I've found won't compile and I don't know how to adapt them. • Seemingly almost applicable example for JVM: https://kotlinlang.org/docs/mpp-configure-compilations.html#create-a-custom-compilation • Another seemingly almost applicable example for JVM: https://docs.gradle.org/current/userguide/java_testing.html#sec:configuring_java_integration_tests
    g
    • 2
    • 1
  • l

    Landry Norris

    12/23/2021, 5:59 PM
    [Fixed] I’m trying to use the mobile-ffmpeg-full pod in a Kotlin/Native project, but it always says that it can’t find the mobile_ffmpeg_full module. I saw the YouTrak ticket saying that K/N replaces dashes with underscores, but looking at the podspec for this library, the author didn’t override the name with one using underscores.
    • 1
    • 2
  • c

    caffeine

    12/24/2021, 9:06 AM
    Hi Can you help me? I have this code in common
    expect class ContextRef
    then I try implement this code for linux_x64:
    actual typealias ContextRef = LLVMContextRef
    in this case i got error because
    LLVMContextRef
    is alias:
    public typealias LLVMContextRef = kotlinx.cinterop.CPointer<cnames.structs.LLVMOpaqueContext>
    okey, it is fine, I forgot about that thing. I try to change my code to
    actual typealias ContextRef = kotlinx.cinterop.CPointer<cnames.structs.LLVMOpaqueContext>
    And i got suddenly error:
    Type arguments in the right-hand side of actual type alias should be its type parameters in the same order, e.g. 'actual typealias Foo<A, B> = Bar<A, B>'
    Why it happend? Why it work fine without
    expect
    and
    actual
    ? How I can fix it?
    • 1
    • 2
  • l

    Landry Norris

    12/28/2021, 9:19 PM
    This may be a stupid question, but I noticed in one of my projects that when I added cinterop to my targets like below, the run tasks for native disappeared. I’m having to run the link task to build the executable and run it manually. Is there something I’m doing wrong? Here is how I’m configuring my target
    binaries {
        executable()
    }
    val mainCompile = compilations["main"]
    mainCompile.cinterops {
        val gtk3 by creating
        val ffmpeg by creating
    }
    mainCompile.enableEndorsedLibs = true
    c
    • 2
    • 2
  • s

    spierce7

    01/03/2022, 5:58 AM
    Is it possible to hook into an objc observer using Kotlin? I need to observe the % of a download task and route it’s current value to a Flow. Can’t seem to find out how to do it.
    c
    s
    • 3
    • 5
  • i

    Ivan Zinchenko

    01/04/2022, 8:24 AM
    hi there 👋 i’m playing around kotlin-native compilation for a kts (script), but getting weird exceptions from kotlinc-native so far:
    # docker run --rm -it --volume $(pwd):/tool --workdir="/tool" --entrypoint sh adoptopenjdk/openjdk11
    
    # get the kotlin-native cli pack
    apt-get update && apt-get install wget 
    wget <https://github.com/JetBrains/kotlin/releases/download/v1.6.10/kotlin-native-linux-x86_64-1.6.10.tar.gz> && \
    tar -xvzf kotlin-native-*.tar.gz && \
    rm *.tar.gz && \
    mv kotlin-native-* kotlin-native
    
    # test.main.kts only has one line:
    # println("Hello from script!")
    
    # compile with kotlinc-native
    kotlin-native/bin/kotlinc-native -script test.main.kts -o test
    results:
    * Source files: test.main.kts
     * Compiler version info: Konan: 1.6.10 / Kotlin: 1.6.10
     * Output kind: PROGRAM
    
    exception: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration Test_main
    File being compiled: (1,1) in /tool/test.main.kts
    The root cause org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException was thrown at: org.jetbrains.kotlin.resolve.lazy.BasicAbsentDescriptorHandler.diagnoseDescriptorNotFound(AbsentDescriptorHandler.kt:18)
    
    ...
    Caused by: org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException: Descriptor wasn't found for declaration SCRIPT
    it should be possible to compile script to native, right? Thanks in advance for any feedback!
    e
    • 2
    • 1
  • s

    spierce7

    01/04/2022, 2:52 PM
    I just moved my old project to the new 
    embedAndSignAppleFrameworkForXcode
    approach, and now code completion isn’t working for us in xcode for any code from our framework. Where should I be looking to fix this?
    s
    • 2
    • 4
  • a

    Anton Afanasev

    01/05/2022, 3:39 PM
    Silly question, for people with KMM/iOS experience here. What is the best way to switch over kotlin sealed classes on iOS (if at all)?
    data class Payload(val name: String)
    
    sealed class Event {
       
        class Inserted(val payload: Payload) : Event()
        
        class Updated(val payload: Payload) : Event()
        
        class UpdatedAll(val payloads: List<Payload>, val flag: Boolean) :
            Event()
    }
    p
    p
    s
    • 4
    • 12
  • s

    spierce7

    01/05/2022, 9:38 PM
    What is the best way to dig into OOM crashes with Kotlin/native?
    Out Of Memory: The app was likely terminated by the operating system while in the foreground
    
    0 unknown file unknown method
    I’m seeing the following error after running a video player in production for only an hour or so.
    p
    • 2
    • 3
  • s

    Stan Potemkin

    01/06/2022, 4:35 PM
    I guess the incremental compilation doesn’t work for native builds. If I change any single source file, then Android Studio takes very short time to
    build
    the app. However, the
    run
    button currently takes about 3 minutes after any single change, and about 3 seconds if no changes were made. Executing this:
    ./gradlew compileKotlinIosX64 --parallel --build-cache -i
    Shows that there is a call to:
    Run tool: "konanc" with args: -g -ea -target ios_x64 -p library -o <...>
    with tens of source files as arguments (every source file, not just modified one) Is there any possibility to prevent rebuilding
    shared.klib
    from scratch every time?
    e
    k
    • 3
    • 6
  • d

    Dmitry Kandalov

    01/10/2022, 6:52 PM
    Does anyone know how to use
    CGDisplayMode
    from macos CoreGraphics in Kotlin (1.6.10)? In particular, I can’t make the following code work:
    fun main() {
        val displayModes = CGDisplayCopyAllDisplayModes(1, null)!!.toNsArray()
        val displayMode = displayModes.objectAtIndex(0)
        println(displayMode) // prints <CGDisplayMode 0x600003648840> [{ BitsPerPixel = 32; ... }]
        println(displayMode as? CGDisplayMode) // compilation error: java.lang.IllegalStateException: class CGDisplayMode... long stacktrace
        println(displayMode as? CGDisplayModeRef) // prints null
        println((displayMode as? NSObject)?.className) // prints __NSCFType
    }
    
    private fun CFArrayRef.toNsArray() = CFBridgingRelease(this) as NSArray
    s
    r
    • 3
    • 13
  • l

    Landry Norris

    01/11/2022, 5:50 PM
    Are there plans for a built-in function to handle Objective-C selectors from K/N? I spent longer than I’d like to admit setting up a class and getting the string exactly right for NSSelectorFromString.
    • 1
    • 1
  • n

    napperley

    01/13/2022, 3:27 AM
    Encountering a strange issue where the CPU on the target device (Raspberry Pi 4) is maxed out when the button is tapped on rapidly (wondering if an issue has been encountered with the new K/N memory model):
    g
    • 2
    • 4
  • f

    Francesco Pedron

    01/13/2022, 3:47 PM
    Hi, I'm new to kotlin-native and trying to understand if I'm able to interact with a DLL on a windows environment. To understand if it is possible (it seems so) I've built curl from source (to get a sample DLL, I'm going to work with a different one on the actual project) and linked it in my project following what is done on ktor-client-curl. Something seems to work as I am able to build the project and some klibs (e.g. http-client-cinterop-libcurl.klib) are generated. Build starts failing when i try to call some method from the DLL, for example in my main method I call:
    curl_easy_init()
    When this line is added I get this error on build:
    The C:\Users\Francesco\.konan\dependencies\llvm-11.1.0-windows-x64-essentials/bin/clang++ command returned non-zero exit code: 1.
    output:
    lld: error: unable to find library -lcurl
    clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    This is my libcurl.def:
    package = libcurl
    headers = curl.h
    headerFilter = *
    linkerOpts.mingw_x64 = -LC:/msys64/mingw64/lib -LC:/Tools/msys64/mingw64/lib -lcurl -L/opt/homebrew/opt/curl/include/curl
    compilerOpts.mingw_x64 = -IC:/msys64/mingw64/include/curl -IC:/Tools/msys64/mingw64/include/curl
    Please let me know if someone has some clues on how to get it working or if I can provide more information. Thanks. This is a repo with my current project: https://github.com/francescopedronomnys/kotlin-native-libcurl-dll Something that I find strange is that this is part of libcurl.def as defined on ktor-client-curl:
    linkerOpts.mingw_x64 = -LC:/msys64/mingw64/lib -LC:/Tools/msys64/mingw64/lib -LC:/Tools/msys2/mingw64/lib -lcurl -L/opt/homebrew/opt/curl/include/curl
    compilerOpts.mingw_x64 = -I/usr/include/curl -I/usr/include/x86_64-linux-gnu/curl -I/opt/homebrew/opt/curl/include/curl
    I do not understand if those paths on
    compilerOpts.mingw_x64
    are correct or just a copy/paste error, to me they don't look like Windows paths and so on my libcurl.def I've set the path where curl's dll, lib and headers are (
    C:/Tools/msys64/mingw64
    )
    m
    • 2
    • 6
  • r

    Raed Ghazal

    01/14/2022, 1:53 PM
    Hi can I have the same variable name in a class and its sub-inner class, and be able to call it in that inner class?
    class A {
       var x = 5
       
       inner class B {
           val x = "upper-class".x 
       }
    }
    ❌ 1
    :yes: 1
    b
    r
    • 3
    • 3
  • s

    spierce7

    01/17/2022, 6:00 PM
    I have a Kotlin Native application. It compiles to
    mingwX64
    and
    macosX64
    . It also uses a library via cinterop that works with Mac and Windows, and shares the same header files. The problem is that in my project, the library ONLY seems accessible in the mingwX64 or the macosX64 source set. Creating expect/actuals for every single type would be extremely cumbersome. I have
    kotlin.mpp.enableGranularSourceSetsMetadata=true
    . Something tells me this is supposed to work, but I’ve just done something wrong. Should this be working?
    r
    a
    • 3
    • 4
  • r

    Rita Okonkwo

    01/18/2022, 12:11 PM
    Hi everyone! Please can anyone recommend a good kotlin course? That covers key concepts like concurrency, data structures and algorithms, etc
    k
    • 2
    • 4
Powered by Linen
Title
r

Rita Okonkwo

01/18/2022, 12:11 PM
Hi everyone! Please can anyone recommend a good kotlin course? That covers key concepts like concurrency, data structures and algorithms, etc
k

kpgalligan

01/18/2022, 2:01 PM
For native specifically or Kotlin in general? We’re at a bit of an interesting juncture in the history of native. For concurrency specifically.
I haven’t had a lot of personal experience with “getting started” content, but I would take a look here: https://www.youtube.com/playlist?list=PLVUm4IewkTXqwzuRXZisWg7shMTiQhUtz
r

Rita Okonkwo

01/18/2022, 2:18 PM
Kotlin in general
Thanks a lot for your recommendation @kpgalligan
View count: 14