I updated a C library I’m using with a K/N project...
# kotlin-native
l
I updated a C library I’m using with a K/N project, and a few variables now have the following when I check the type using IDEA:
CPointer<[ERROR : Unknown type parameter 0. Please try recompiling module containing "[container not found]"]>
. I know that the types are AVStream, and that AVStream is recognized by Kotlin. This seems to occur when using the get(index) extension provided by the cinterop package. Has anyone run into this issue before? [Fixed by downgrading Kotlin from 1.6.20-RC to 1.6.10]
In the generated klib, I see the following property
public expect final var streams: kotlinx.cinterop.CPointer<kotlinx.cinterop.CPointerVar<ffmpeg.AVStream>
. When I check the type of x after
val x = context.streams?.get(0)
, I get the above type error.
Downgrading to Kotlin 1.6.10 seems to have solved this. It may be a bug in the 1.6.20-RC