Can Kotlin Native cinterop work with a C++ library whose only public functions are marked as
extern "C"
?
d
Dominaezzz
05/01/2020, 10:03 PM
Yes but you still need a C header for it I think.
n
natario1
05/01/2020, 10:21 PM
Thanks Dominic! The lib has several C++ headers, but the one that matters (the lib API surface) has only
extern "C"
functions.
Do you think I should pass this main header to cinterop, or write another, or what? This header of course includes the other C++ headers of the library - not sure if this would create issues.
d
Dominaezzz
05/01/2020, 11:24 PM
I think you should write another header, it'll most be copy and paste, or maybe even some macros. There may a tool that can do this for ya.