Hello, what is the IDE I can use for development of kotlin/native application with some code in C / C++? Should I use CLion or IntelliJ? Also what version?
l
Lempere
10/14/2018, 6:14 PM
kotlin/native is gradle based, and will work with the two IDEs but a bit better with IntelliJ with the lastest EAP versions
n
napperley
10/14/2018, 8:25 PM
Kotlin Native with IntelliJ (incl Community Edition) is only supported in the recent EAP versions.
m
Matej Kormuth
10/14/2018, 8:26 PM
I installed the EAP version, but the build.gradle file is different than it used to be. Is there any documentation how to configure interop() artifacts (for integration with C)?
Thank you for the link, however now I have problem when I try to use C library from Kotlin. I downloaded LZ4 from github, built it as static library, then created
but when I try to build application with call to library I get this strange linker? error:
Copy code
> Task :compileDebugKotlinNative
C:\Users\Matej\AppData\Local\Temp\konan_temp5398659378648080731\combined.o:(.text+0x242f5): undefined reference to `LZ4_versionNumber'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
error: c:\Users\Matej\.konan\dependencies\msys2-mingw-w64-x86_64-gcc-7.3.0-clang-llvm-lld-6.0.1/bin/clang++ invocation reported errors
Any idea, how to configure it correctly?
Matej Kormuth
10/14/2018, 11:38 PM
Nevermind, the LZ4 library I had was 32bit, while the kotlin build was 64bit - that's why the linking error appeared. The only problem I have now is that my IntelliJ doesn't recognize .kt files as kotlin source files, nor does it recognize the interop library.