Hello everyone, how should I interoperate with C++ in the native target of the kotlin-multiplatform? I need to call a library whose header file is C++, the library is a bit huge, so it is unrealistic to manually change it to a C header. In addition, I am a newbie to C/C++, so this question may be a bit stupid.
b
Big Chungus
02/27/2022, 9:29 PM
Not possible at the moment
g
gildor
02/28/2022, 8:08 AM
manually change it to a C header
You can write on C headers for API which you need, this essentially how you do JNI for example
c
Chachako
02/28/2022, 8:50 AM
This may be a little unrealistic because there are many files associated with them. It is a huge library with 200 header files...🥲
Chachako
02/28/2022, 8:51 AM
So if there is an automatic wrapper, should it be great? But thank you for your answer anyway
g
gildor
02/28/2022, 9:14 AM
No, there is no automatic wrapper, at least popular one, at least for k/n
gildor
02/28/2022, 9:15 AM
though there is may be some C API generator for C++, but concidering how complex C++ it may be not perfect of course